/**
 * VFT Test Form Styles - Based on Raw Version Design
 * Author: Md Ashikur Rahman
 */

@import url('https://fonts.googleapis.com/css2?family=Questrial&display=swap');

html {
    scroll-behavior: smooth;
}

.vft-test-form-container {
    font-family: 'Questrial', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px; /* Normal website font size */
    min-height: 100vh;
}

/* Hero Header */
.vft-hero-header {
    position: relative;
    height: 70vh;
    width: 100%;
    overflow: hidden;
}

.vft-hero-bg {
    position: absolute;
    inset: 0;
    height: 100%;
    width: 100%;
    object-fit: cover;
}

/* Video background styles */
.vft-hero-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Embedded video background styles */
.vft-hero-embed {
    position: absolute;
    inset: 0;
    height: 100%;
    width: 100%;
}

.vft-hero-embed iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
}

.vft-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.vft-hero-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 0 1rem;
}

.vft-hero-title {
    font-size: 2.5rem; /* 40px */
    font-weight: bold;
    margin-bottom: 1rem;
}

.vft-hero-subtitle {
    max-width: 32rem;
    margin: 0 auto;
    font-size: 1.125rem; /* 18px */
    opacity: 0.95;
    margin-bottom: 1.5rem;
}

.vft-hero-cta {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    background: white;
    color: black;
    font-weight: 500;
    text-decoration: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.vft-hero-cta:hover {
    background: #f5f5f5;
}

/* Main Content */
.vft-main-content {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
    margin-top: -2.5rem;
    position: relative;
    z-index: 20;
}

.vft-requirements-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
}

.vft-requirements-title {
    font-size: 1.25rem; /* 20px */
    font-weight: 600;
    margin-bottom: 1rem;
}

.vft-requirements-list {
    list-style-type: disc;
    list-style-position: inside;
    margin: 0;
    padding: 0;
}

.vft-requirements-list li {
    margin-bottom: 0.25rem;
    color: #000000;
}

.vft-requirements-details {
    margin-top: 1rem;
}

.vft-requirements-summary {
    cursor: pointer;
    font-size: 0.875rem; /* 14px */
    color: #000000;
}

.vft-requirements-full {
    margin-top: 0.5rem;
    list-style-type: disc;
    list-style-position: inside;
    color: #000000;
}

.vft-form-wrapper {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem 2rem;
}

/* Progress Bar */
.vft-progress-container {
    margin-bottom: 1.5rem;
}

.vft-progress-bar-bg {
    height: 0.5rem;
    width: 100%;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.vft-progress-bar-fill {
    height: 100%;
    background: #EEECE8;
    transition: all 0.3s ease-in-out;
}

.vft-progress-text {
    font-size: 0.875rem; /* 14px */
    color: #000000;
    margin-top: 0.5rem;
}

/* Form Inputs */
.vft-input {
    width: 100%;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    padding: 0.75rem 1rem;
    background: white;
    transition: all 0.2s ease-in-out;
    font-size: 1rem; /* 16px - normal input size */
    box-sizing: border-box;
}

.vft-input:focus {
    outline: none;
    border-color: #EEECE8;
    box-shadow: 0 0 0 3px rgba(238, 236, 232, 0.3);
}

.vft-input:invalid {
    border-color: #ef4444;
}

.vft-input.border-red-500 {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Grid System */
.vft-grid {
    display: grid;
    gap: 1rem;
}

.vft-grid-cols-12 {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.vft-grid-cols-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.vft-grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.vft-grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vft-col-span-12 { grid-column: span 12 / span 12; }
.vft-col-span-8 { grid-column: span 8 / span 8; }
.vft-col-span-6 { grid-column: span 6 / span 6; }
.vft-col-span-4 { grid-column: span 4 / span 4; }
.vft-col-span-3 { grid-column: span 3 / span 3; }

/* Form Sections */
.vft-step-content {
    transition: all 0.3s ease-in-out;
}

.vft-form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.vft-label {
    font-size: 0.875rem; /* 14px */
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.vft-step-content.hidden {
    display: none;
}

/* Hidden utility class */
.hidden {
    display: none !important;
}

/* Signature Pad Styles */
#signature-pad {
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: crosshair;
    display: block;
    width: 100%;
    max-width: 600px;
    height: 200px;
    touch-action: none;
}

.vft-signature-area {
    margin: 20px 0;
}

#clear-signature {
    margin-top: 10px;
    padding: 8px 16px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

#clear-signature:hover {
    background: #e0e0e0;
}

.vft-step-title {
    font-size: 1.125rem; /* 18px */
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.vft-section-title {
    font-size: 1rem; /* 16px */
    font-weight: 500;
    color: #374151;
    margin-bottom: 1rem;
}

.vft-form-section {
    margin-bottom: 1.5rem;
}

.vft-form-section:last-child {
    margin-bottom: 0;
}

/* Radio Buttons */
.vft-radio-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.vft-radio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vft-radio-item input[type="radio"] {
    margin: 0;
}

.vft-radio-item label {
    font-size: 0.875rem; /* 14px */
    font-weight: 500;
    cursor: pointer;
}

/* File Upload */
.vft-file-upload {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.vft-file-input {
    display: none;
}

.vft-file-label {
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.vft-file-label:hover {
    background: #e5e7eb;
}

.vft-file-status {
    font-size: 0.875rem; /* 14px */
    color: #6b7280;
}

/* Buttons */
.vft-btn {
    padding: 0.625rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.vft-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.vft-btn-primary {
    background: black;
    color: white;
}

.vft-btn-primary:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.8);
}

.vft-btn-secondary {
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
}

.vft-btn-secondary:hover:not(:disabled) {
    background: #f9fafb;
}

.vft-btn-success {
    background: #EEECE8;
    color: black;
}

.vft-btn-success:hover:not(:disabled) {
    background: #EEECE8;
}

.vft-btn-warning {
    background: #EEECE8;
    color: black;
}

.vft-btn-warning:hover:not(:disabled) {
    background: #EEECE8;
}

.vft-btn-danger {
    background: #dc2626;
    color: white;
}

.vft-btn-danger:hover:not(:disabled) {
    background: #b91c1c;
}

/* Error Messages */
.vft-field-error {
    color: #ef4444;
    font-size: 0.75rem; /* 12px */
    margin-top: 0.25rem;
    display: block;
}

/* Error message styling */
.vft-field-error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
    font-weight: 500;
}

.vft-step-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

/* Form Navigation */
.vft-form-navigation {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Success Message */
.vft-success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.vft-success-modal {
    background: white;
    border-radius: 0.5rem;
    padding: 2rem;
    max-width: 28rem;
    margin: 0 1rem;
    text-align: center;
}

.vft-success-icon {
    color: #10b981;
    font-size: 3.75rem;
    margin-bottom: 1rem;
}

.vft-success-title {
    font-size: 1.25rem; /* 20px */
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.vft-success-message {
    color: #6b7280;
    margin-bottom: 1rem;
}

/* Authorization Box */
.vft-authorization-box {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.vft-authorization-text {
    font-size: 0.875rem; /* 14px */
    color: #374151;
    line-height: 1.6;
}

/* Signature Area */
.vft-signature-area {
    border: 2px dashed #d1d5db;
    border-radius: 0.5rem;
    padding: 2rem;
    background: #f9fafb;
    min-height: 7.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.vft-signature-placeholder {
    text-align: center;
}

.vft-signature-icon {
    color: #9ca3af;
    font-size: 1.125rem; /* 18px */
    margin-bottom: 0.5rem;
}

.vft-signature-text {
    font-size: 0.875rem; /* 14px */
    color: #6b7280;
}

/* Occupants Management */
.vft-occupants-container {
    margin-bottom: 1rem;
}

.vft-occupant-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.vft-occupant-input {
    flex: 1;
}

/* Banks */
.vft-bank-item {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: #f9fafb;
}

/* Creditors */
.vft-creditor-item {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: #f9fafb;
}

/* SOS (Emergency Contacts) */
.vft-sos-item {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: #f9fafb;
}

/* Personal References */
.vft-personal-ref-item {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: #f9fafb;
}

/* Footer Note */
.vft-footer-note {
    font-size: 0.75rem; /* 12px */
    color: #000000;
    margin-top: 1.5rem;
    margin-bottom: 2.5rem;
    text-align: center;
}

.vft-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: #EEECE8;
    color: #000000;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.vft-header h1 {
    margin: 0 0 10px 0;
    font-size: 2rem; /* 32px */
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.vft-header p {
    margin: 0;
    font-size: 1rem; /* 16px */
    opacity: 0.9;
}

.vft-form-wrapper {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.vft-test-form {
    padding: 40px;
}

.form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e9ecef;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 20px;
}

.form-section h2 {
    color: #000000;
    font-size: 1.2em;
    font-weight: 600;
    margin: 0 0 25px 0;
    padding-bottom: 10px;
    border-bottom: 3px solid #EEECE8;
    position: relative;
}

.form-section h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 50px;
    height: 3px;
    background: #000000;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #000000;
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="tel"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9em;
    transition: all 0.3s ease;
    background: #fff;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="date"]:focus,
.form-group input[type="tel"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #EEECE8;
    box-shadow: 0 0 0 3px rgba(238, 236, 232, 0.3);
    transform: translateY(-1px);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.form-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    accent-color: #EEECE8;
    transform: scale(1.2);
}

.form-group input[type="checkbox"] + label {
    display: inline-block;
    margin-bottom: 0;
    cursor: pointer;
    font-weight: normal;
    text-transform: none;
    letter-spacing: normal;
}

/* Special styling for checkbox groups */
.form-row .form-group:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.form-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e9ecef;
}

.submit-btn,
.reset-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 120px;
}

.submit-btn {
    background: #EEECE8;
    color: #000000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    background: #E0DDD8;
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.reset-btn {
    background: #6c757d;
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

.reset-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.6);
}

.form-messages {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    display: none;
}

.form-messages.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    display: block;
}

.form-messages.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    display: block;
}

.form-messages.warning {
    background: #EEECE8;
    border: 1px solid #EEECE8;
    color: #EEECE8;
    display: block;
}

/* Loading state */
.vft-test-form.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.vft-test-form.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    margin: -25px 0 0 -25px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: vft-spin 1s linear infinite;
    z-index: 1000;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .vft-test-form-container {
        font-size: 16px; /* Normal mobile font size */
    }
    
    .vft-hero-title {
        font-size: 2rem; /* 32px on mobile */
    }
    
    .vft-main-content {
        margin-top: -1.5rem;
        padding: 0 0.5rem;
    }
    
    .vft-requirements-section,
    .vft-form-wrapper {
        padding: 1rem;
    }
    
    .vft-grid-cols-12,
    .vft-grid-cols-6,
    .vft-grid-cols-4,
    .vft-grid-cols-3 {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .vft-col-span-12,
    .vft-col-span-8,
    .vft-col-span-6,
    .vft-col-span-4,
    .vft-col-span-3 {
        grid-column: span 1 / span 1;
    }
    
    .vft-input {
        padding: 0.625rem 0.75rem;
        font-size: 16px; /* Normal mobile input size */
    }
    
    .vft-form-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .vft-btn {
        width: 100%;
    }
    
    .vft-radio-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .vft-file-upload {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .vft-occupant-item {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .vft-test-form-container {
        font-size: 16px; /* Normal font size even on small screens */
    }
    
    .vft-header h1 {
        font-size: 1.6em;
    }
    
    .form-section h2 {
        font-size: 1.1em;
    }
    
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="number"],
    .form-group input[type="date"],
    .form-group input[type="tel"],
    .form-group textarea,
    .form-group select {
        font-size: 0.8em; /* Maintains small font but prevents zoom */
        padding: 6px 8px;
    }
}

/* Print Styles */
@media print {
    .vft-header {
        background: #333 !important;
        color: white !important;
    }
    
    .form-actions {
        display: none;
    }
    
    .vft-test-form {
        padding: 0;
    }
    
    .form-section {
        break-inside: avoid;
        margin-bottom: 20px;
    }
}

/* Required Field Indicators */
.vft-field-required .vft-section-title {
    color: #dc2626 !important;
    font-weight: 600 !important;
}

.vft-field-required .vft-important-badge {
    color: #dc2626;
    font-weight: bold;
    margin-left: 4px;
}

.vft-field-required .vft-radio-group {
    border: 2px solid #dc2626;
    border-radius: 8px;
    padding: 12px;
    background-color: #fef2f2;
}

.vft-radio-group-error {
    border: 2px solid #dc3545 !important;
    background-color: #fff5f5 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.vft-field-required .vft-form-group {
    border: 2px solid #dc2626;
    border-radius: 8px;
    padding: 12px;
    background-color: #fef2f2;
}

/* Validation Error Styles */
.vft-field-error {
    border: 2px solid #dc3545 !important;
    background-color: #fff5f5 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.vft-field-error:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.vft-field-error + .vft-field-error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Occupants Grid Layout */
.vft-occupants-container {
    margin-bottom: 1rem;
}

.vft-occupant-item {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background-color: #f9fafb;
}

.vft-occupant-item .vft-grid {
    margin-bottom: 0.5rem;
}

.vft-occupant-item .remove-occupant {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

/* File Upload Error Styling */
.vft-file-upload.vft-field-error .vft-file-label {
    border: 2px solid #dc3545 !important;
    background-color: #fff5f5 !important;
    color: #dc3545 !important;
}

.vft-file-upload.vft-field-error .vft-file-status {
    color: #dc3545 !important;
    font-weight: 500;
}

/* Keep file input hidden even with error styling - only for actual file inputs */
.vft-file-input.vft-field-error {
    display: none !important;
}

/* Ensure regular input fields with error class are still visible */
input.vft-field-error:not([type="file"]) {
    display: block !important;
}

/* Equal Housing Opportunity Text */
.vft-equal-housing-text {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    font-size: 0.9rem;
    line-height: 1.6;
    max-height: 300px;
    overflow-y: auto;
}

.vft-equal-housing-text h4 {
    color: #495057;
    margin-bottom: 15px;
    font-weight: 600;
}

.vft-equal-housing-text p {
    margin-bottom: 12px;
    color: #6c757d;
}

.vft-equal-housing-text ul {
    margin: 15px 0;
    padding-left: 20px;
}

.vft-equal-housing-text li {
    margin-bottom: 8px;
    color: #6c757d;
}
h1.vft-hero-title {
    color: white;
}

@media (min-width: 1025px) {
    .desktop-only {
        display: block;
		scale:9;
    }
    .mobile-only {
        display: none;
    }
}

/* Tablet & Mobile: hide video, show image */
@media (max-width: 1024px) {
    .desktop-only {
        display: none !important;
    }
    .mobile-only {
        display: block;
    }
}