/* RentSmart Public Application - Modern Professional Design */

* {
    box-sizing: border-box;
}

.rentsmart-public-application {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Header Styling */
.application-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 20px;
    background: linear-gradient(135deg, #D81F26 0%, #B81B21 100%);
    border-radius: 16px;
    color: white;
    box-shadow: 0 10px 30px rgba(216, 31, 38, 0.3);
}

.application-header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    letter-spacing: -0.02em;
}

.application-header p {
    font-size: 1.2rem;
    margin: 0 0 20px 0;
    opacity: 0.9;
    font-weight: 400;
}

.version-info {
    background: rgba(255, 255, 255, 0.15);
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

/* Progress Indicator in Header */
.progress-container-header {
    margin-top: 25px;
    padding: 0;
}

.progress-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.progress-fill {
    height: 100%;
    background: white;
    border-radius: 3px;
    width: 14.28%; /* 1/7 steps */
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Section Container */
.application-section {
    margin-bottom: 40px;
}

/* Card Design */
.application-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
    overflow: visible;
}

.application-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #D81F26, #B81B21);
}

.application-card h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 30px 0;
    text-align: center;
}

/* Option Cards */
.application-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

.option-card {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px 25px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.option-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(216, 31, 38, 0.1), transparent);
    transition: left 0.5s;
}

.option-card:hover {
    border-color: #D81F26;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(216, 31, 38, 0.15);
}

.option-card:hover::before {
    left: 100%;
}

.option-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 10px 0;
}

.option-card p {
    color: #718096;
    margin: 0 0 20px 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Multi-Step Form */
.form-step {
    display: none;
    overflow: visible;
}

.form-step.active {
    display: block;
    animation: fadeInSlide 0.5s ease-out;
    overflow: visible;
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-header {
    text-align: center;
    margin-bottom: 40px;
}

.step-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1a202c;
    margin: 0 0 10px 0;
}

.step-header p {
    color: #718096;
    font-size: 1.1rem;
    margin: 0;
}

/* Step Navigation */
.step-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #e2e8f0;
}

.step-navigation .btn:only-child {
    margin-left: auto;
}

/* Form Layout */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

/* Input Styling */
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #D81F26;
    box-shadow: 0 0 0 4px rgba(216, 31, 38, 0.1);
    transform: translateY(-1px);
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #718096;
    font-size: 0.85rem;
}

/* Searchable Dropdown */
.searchable-dropdown-container {
    position: relative;
}

#property-search {
    background: white;
    position: relative;
    z-index: 1;
}

/* Make readonly state invisible to users */
#property-search[readonly] {
    cursor: text;
    background: white;
    opacity: 1;
}

/* Prevent autofill styling on property search */
#property-search:-webkit-autofill,
#property-search:-webkit-autofill:hover,
#property-search:-webkit-autofill:focus {
    -webkit-text-fill-color: #333 !important;
    -webkit-box-shadow: 0 0 0px 1000px white inset !important;
    transition: background-color 5000s ease-in-out 0s !important;
    background: white !important;
}

.searchable-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #D81F26;
    border-top: none;
    border-radius: 0 0 8px 8px;
    z-index: 9999;
    display: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.searchable-dropdown.show {
    display: block;
}

.dropdown-option {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.dropdown-option:hover {
    background: #f8fafc;
    color: #D81F26;
}

.dropdown-option:last-child {
    border-bottom: none;
}

.dropdown-option.selected {
    background: #fef5f5;
    color: #D81F26;
    font-weight: 500;
}

.dropdown-footer {
    padding: 10px 16px;
    background: #f8fafc;
    color: #718096;
    font-size: 0.85rem;
    font-style: italic;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

/* Number Input - Keep spinners visible */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: inner-spin-button;
    opacity: 1;
}

/* Phone Input Styling */
.phone-input::placeholder {
    color: #9ca3af;
}

/* Password Input with Toggle */
.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-container input {
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s ease;
    z-index: 1;
}

.password-toggle:hover {
    color: #D81F26;
    background-color: rgba(216, 31, 38, 0.1);
}

.password-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(216, 31, 38, 0.2);
}

.eye-icon {
    transition: all 0.2s ease;
}

/* Initial state - show open eye, hide closed eye */
.password-toggle .eye-open {
    display: block;
}

.password-toggle .eye-closed {
    display: none;
}

/* When visible (password shown) - hide open eye, show closed eye */
.password-toggle.visible .eye-open {
    display: none;
}

.password-toggle.visible .eye-closed {
    display: block;
}

/* Signature Pad */
.signature-container {
    background: #f8fafc;
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.signature-container:hover {
    border-color: #D81F26;
    background: #fff5f5;
}

/* Signature Canvas */
.signature-container {
    text-align: center;
    margin: 20px 0;
}

#signature-canvas {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    cursor: crosshair;
    display: block;
    margin: 0 auto 15px;
    width: 100%;
    max-width: 500px;
    height: 200px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.signature-controls {
    margin-top: 15px;
}

/* Checkboxes */
.checkbox-group {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #D81F26;
}

.checkbox-group label {
    display: flex;
    align-items: flex-start;
    font-weight: 500;
    cursor: pointer;
    color: #374151;
    line-height: 1.6;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: #D81F26;
}

/* Payment Info Text */
.payment-info-text {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    color: #0369a1;
    font-size: 14px;
    line-height: 1.5;
}

/* Application Summary */
.application-summary {
    background: #f8fafc;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid #e2e8f0;
}

.application-summary h3 {
    color: #1a202c;
    margin: 0 0 20px 0;
    font-size: 1.3rem;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #D81F26;
    display: inline-block;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.summary-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.summary-label {
    font-weight: 600;
    color: #374151;
}

.summary-value {
    color: #4a5568;
    font-weight: 500;
}

/* Fee Summary */
.fee-summary {
    background: linear-gradient(135deg, #D81F26 0%, #B81B21 100%);
    color: white;
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
}

.fee-summary h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.fee-calculation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 600;
}

.fee-amount {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* Payment Section */
#card-element {
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    transition: border-color 0.3s ease;
}

#card-element:focus-within {
    border-color: #D81F26;
    box-shadow: 0 0 0 4px rgba(216, 31, 38, 0.1);
}

#card-errors {
    color: #e53e3e;
    margin-top: 10px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    letter-spacing: 0.025em;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #D81F26 0%, #B81B21 100%) !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(216, 31, 38, 0.3);
    border: none !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: linear-gradient(135deg, #B81B21 0%, #A0181D 100%) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(216, 31, 38, 0.4);
}

.btn-secondary {
    background: #f7fafc !important;
    color: #4a5568 !important;
    border: 2px solid #e2e8f0 !important;
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active {
    background: #edf2f7 !important;
    color: #4a5568 !important;
    border-color: #cbd5e0 !important;
    transform: translateY(-1px);
}

.btn-link {
    background: none;
    color: #D81F26;
    text-decoration: none;
    padding: 8px 0;
    font-weight: 500;
    border-radius: 4px;
}

.btn-link:hover {
    color: #B81B21;
    text-decoration: underline;
}

.btn-back {
    background: none !important;
    color: #718096 !important;
    text-decoration: none;
    padding: 10px 16px !important;
    font-weight: 600;
    border-radius: 8px;
    border: 2px solid #e2e8f0 !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-size: 15px;
    margin-bottom: 20px;
    cursor: pointer;
}

.btn-back:hover,
.btn-back:focus,
.btn-back:active {
    background: #f7fafc !important;
    color: #4a5568 !important;
    border-color: #cbd5e0 !important;
    transform: translateX(-2px);
}

.btn-large {
    width: 100%;
    padding: 18px 32px;
    font-size: 18px;
    margin-top: 30px;
    border-radius: 12px;
}

/* Additional Applicants */
.additional-applicant {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    position: relative;
}

.additional-applicant h4 {
    color: #2d3748;
    margin: 0 0 20px 0;
    font-size: 1.2rem;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 2px solid #D81F26;
    display: inline-block;
}

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 32, 44, 0.8);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.loading-content {
    background: white;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 300px;
}

.loading-content p {
    margin: 0;
    color: #4a5568;
    font-weight: 500;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #D81F26;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Messages */
.error-message {
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    color: #742a2a;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #e53e3e;
    font-weight: 500;
}

.email-warning {
    background: linear-gradient(135deg, #fee 0%, #fdd 100%);
    padding: 12px 16px;
    border-radius: 6px;
    border-left: 3px solid #D81F26;
    margin-top: 8px;
}

.email-warning p {
    margin: 0;
    line-height: 1.5;
}

.email-warning a {
    color: #D81F26;
    text-decoration: underline;
    font-weight: 600;
}

.email-warning a:hover {
    color: #B81B21;
    text-decoration: none;
}

/* Form Validation Styles */
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
    border-color: #e53e3e;
    box-shadow: 0 0 0 4px rgba(229, 62, 62, 0.1);
}

.checkbox-group.has-error {
    border-left-color: #e53e3e;
    background: #fef5f5;
}

.success-message {
    background: linear-gradient(135deg, #c6f6d5 0%, #9ae6b4 100%);
    color: #22543d;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #38a169;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rentsmart-public-application {
        padding: 20px 15px;
    }
    
    .application-header {
        padding: 30px 20px;
        margin-bottom: 30px;
    }
    
    .application-header h1 {
        font-size: 2.2rem;
    }
    
    .application-card {
        padding: 25px 20px;
    }
    
    .password-toggle {
        right: 10px;
        padding: 6px;
    }
    
    .application-options {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .step-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .step-navigation .btn {
        width: 100%;
    }
    
    .fee-calculation {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    #signature-canvas {
        max-width: 350px;
        height: 180px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 15px;
    }
    
    .btn-large {
        padding: 16px 24px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .application-header h1 {
        font-size: 1.8rem;
    }
    
    .application-header p {
        font-size: 1rem;
    }
    
    .application-card {
        padding: 20px 15px;
    }
    
    #signature-canvas {
        max-width: 280px;
        height: 140px;
    }
}

/* Address Field Layout Styles */
.field-row {
    margin-bottom: 20px;
}

.field-row.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.field-row.three-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

.field-row.four-columns {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 15px;
}

.application-field {
    display: flex;
    flex-direction: column;
}

/* Responsive adjustments for address fields */
@media (max-width: 768px) {
    .field-row.two-columns,
    .field-row.three-columns,
    .field-row.four-columns {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .field-row {
        margin-bottom: 15px;
    }
    
    .field-row.two-columns,
    .field-row.three-columns,
    .field-row.four-columns {
        gap: 10px;
    }
}

/* Error Message Styling */
.error-message {
    background-color: #fee;
    color: #c33;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    border: 1px solid #fcc;
    display: flex;
    align-items: center;
}

.error-message::before {
    content: '⚠';
    margin-right: 8px;
    font-size: 1.2rem;
}

/* Forgot Password Link */
.forgot-password-link {
    color: #D81F26;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    display: inline-block;
    transition: color 0.2s ease;
}

.forgot-password-link:hover {
    color: #B81B21;
    text-decoration: underline;
} 