﻿/* =====================================================================
   Talk to Us Form - Enhanced Minimalist Design (Compact)
   ===================================================================== */

/* Container and Layout */
.formless-container {
    min-height: 100vh;
    background: #040b1d;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.formless-wrapper {
    width: 100%;
    max-width: 36rem;
    animation: fadeIn 0.6s ease-out;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.08);
    margin-bottom: 2rem;
    overflow: hidden;
    border-radius: 2px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.9));
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 20%;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Form */
.formless-form {
    position: relative;
}

/* Question Container */
.question-container {
    position: relative;
    min-height: 320px;
}

/* Individual Questions */
.question {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(30px);
}

    .question.active {
        opacity: 1;
        pointer-events: auto;
        position: relative;
        transform: translateX(0);
    }

    .question.exiting {
        position: absolute;
        opacity: 0;
        transform: translateX(-30px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

/* Question Header */
.question-header {
    margin-bottom: 1.75rem;
}

.question-number {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.question-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
    margin-bottom: 0.625rem;
    animation: slideIn 0.5s ease-out;
    letter-spacing: -0.02em;
}

.question-subtitle {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
    animation: slideIn 0.5s ease-out 0.1s both;
}

/* Question Content */
.question-content {
    margin-bottom: 2rem;
    animation: slideIn 0.5s ease-out 0.2s both;
}

/* Form Inputs - Enhanced Formless.ai Style */
.form-input,
.form-textarea {
    width: 100%;
    background-color: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    padding: 1rem 0;
    color: white;
    font-size: 1.25rem;
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: -0.01em;
}

    .form-input::placeholder,
    .form-textarea::placeholder {
        color: rgba(255, 255, 255, 0.25);
        font-weight: 300;
        transition: color 0.3s ease;
    }

    .form-input:hover::placeholder,
    .form-textarea:hover::placeholder {
        color: rgba(255, 255, 255, 0.35);
    }

    .form-input:focus,
    .form-textarea:focus {
        outline: none;
        background: transparent;
        border-bottom-color: rgba(255, 255, 255, 0.4);
    }

        .form-input:focus::placeholder,
        .form-textarea:focus::placeholder {
            color: rgba(255, 255, 255, 0.4);
        }

    /* Ensure text color stays white when typing */
    .form-input:-webkit-autofill,
    .form-input:-webkit-autofill:hover,
    .form-input:-webkit-autofill:focus,
    .form-input:-webkit-autofill:active {
        -webkit-text-fill-color: white !important;
        -webkit-box-shadow: 0 0 0 1000px #040b1d inset !important;
        transition: background-color 5000s ease-in-out 0s;
    }

.form-textarea {
    min-height: 120px;
    resize: vertical;
    font-size: 1.125rem;
    line-height: 1.6;
    padding: 1rem 0;
}

/* Option Grid */
.option-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .option-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .question-title {
        font-size: 2rem;
    }
}

.option-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.125rem 0.875rem;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

    .option-button::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .option-button:hover {
        border-color: rgba(255, 255, 255, 0.3);
        background-color: rgba(255, 255, 255, 0.04);
        transform: translateY(-2px);
    }

        .option-button:hover::before {
            opacity: 1;
        }

    .option-button:active {
        transform: translateY(0);
    }

    .option-button.selected {
        background-color: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.6);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
    }

        .option-button.selected::before {
            opacity: 1;
        }

.option-icon {
    font-size: 1.5rem;
    transition: transform 0.25s ease;
}

.option-button:hover .option-icon {
    transform: scale(1.1);
}

.option-text {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
}

/* Navigation */
.nav-container,
.nav-container-submit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2rem;
    animation: slideIn 0.5s ease-out 0.3s both;
}

.back-button {
    color: rgba(255, 255, 255, 0.45);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    margin-left: -0.75rem;
}

    .back-button:hover:not(:disabled) {
        color: rgba(255, 255, 255, 0.9);
        transform: translateX(-3px);
    }

    .back-button:disabled {
        opacity: 0;
        pointer-events: none;
    }

/* SVG Icon styles */
.back-button svg,
.next-button svg {
    width: 1rem;
    height: 1rem;
    display: inline-block;
}

.next-button {
    color: rgba(255, 255, 255, 0.85);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    margin-right: -0.75rem;
}

    .next-button:hover:not(:disabled) {
        color: white;
        transform: translateX(3px);
    }

    .next-button:disabled {
        opacity: 0.3;
        cursor: not-allowed;
    }

.submit-button {
    background: white;
    color: #040b1d;
    padding: 0.75rem 2rem;
    border-radius: 2px;
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
    letter-spacing: -0.01em;
}

    .submit-button:hover:not(:disabled) {
        background: rgba(255, 255, 255, 0.95);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(255, 255, 255, 0.25);
    }

    .submit-button:active:not(:disabled) {
        transform: translateY(0);
    }

    .submit-button:disabled {
        opacity: 0.4;
        cursor: not-allowed;
        box-shadow: none;
    }

/* Loading Spinner */
.loading-spinner {
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid rgba(4, 11, 29, 0.2);
    border-top-color: #040b1d;
    border-radius: 9999px;
    animation: spin 0.8s linear infinite;
}

    .loading-spinner.hidden {
        display: none;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Validation Messages */
.validation-message {
    color: #ff6b6b;
    font-size: 0.8125rem;
    margin-top: 0.625rem;
    display: block;
    animation: slideIn 0.3s ease-out;
    font-weight: 500;
}

.validation-summary {
    background-color: rgba(255, 107, 107, 0.08);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 2px;
    padding: 1rem 1.125rem;
    margin-bottom: 1.5rem;
    color: #ff8787;
    font-size: 0.875rem;
    line-height: 1.5;
    animation: slideIn 0.3s ease-out;
}

.border-red-500 {
    color: #ff6b6b !important;
    border-bottom-color: #ff6b6b !important;
}

    .border-red-500::placeholder {
        color: rgba(255, 107, 107, 0.5) !important;
    }

/* Success Screen */
.success-screen {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 0;
    animation: fadeIn 0.8s ease-out;
}

    .success-screen.active {
        display: flex;
    }

.success-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 9999px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    animation: scaleIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 32px rgba(255, 255, 255, 0.2);
}

.success-icon svg {
    width: 2.5rem;
    height: 2.5rem;
    color: white;
}

.success-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    animation: slideIn 0.6s ease-out 0.2s both;
    letter-spacing: -0.02em;
}

.success-message {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 26rem;
    line-height: 1.6;
    animation: slideIn 0.6s ease-out 0.3s both;
}

/* Success Screen - Back to Home Link */
.success-screen a {
    margin-top: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(99, 102, 241, 0.9);
    font-weight: 500;
    transition: color 0.2s ease;
    text-decoration: none;
}

.success-screen a:hover {
    color: rgba(129, 140, 248, 0.9);
}

.success-screen a svg {
    width: 1rem;
    height: 1rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .question-title {
        font-size: 1.5rem;
    }

    .form-input {
        font-size: 1.0625rem;
        padding: 0.875rem 0;
    }

    .form-textarea {
        font-size: 1rem;
        padding: 0.875rem 0;
    }

    .option-button {
        padding: 1rem 0.75rem;
    }

    .submit-button {
        padding: 0.75rem 1.75rem;
        width: 100%;
        justify-content: center;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .option-button:hover,
    .submit-button:hover,
    .next-button:hover,
    .back-button:hover {
        transform: none;
    }
}

/* Focus visible for keyboard navigation */
.form-input:focus-visible,
.form-textarea:focus-visible {
    outline: none;
    border-bottom-color: rgba(255, 255, 255, 0.6);
}

.option-button:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

.back-button:focus-visible,
.next-button:focus-visible,
.submit-button:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 3px;
}
