/* ==========================================
   WAITLIST FORM STYLES
   Professional, mobile-first design
   ========================================== */

/* Global hidden class - must hide elements */
.hidden {
    display: none !important;
}

/* ==========================================
   FULL-SCREEN WAITLIST OVERLAY
   ========================================== */

/* Full-screen overlay - MUST be hidden by default */
.waitlist-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: #0a0a0a !important;
    z-index: 9999 !important;
    display: none !important;
    overflow-y: auto;
}

.waitlist-overlay.active {
    display: block !important;
}

/* Brand in top-left */
.waitlist-overlay .waitlist-brand {
    position: absolute;
    top: 24px;
    left: 32px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.waitlist-overlay .brand-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    line-height: 1;
    padding-bottom: 8px; /* Space for the arrow */
}

.waitlist-overlay .brand-name {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

.waitlist-overlay .brand-arrow {
    position: absolute;
    bottom: -4px;
    left: 8%;
    width: 90%;
    height: auto;
    pointer-events: none;
}

/* Close button top-right */
.waitlist-close {
    position: fixed;
    top: 24px;
    right: 32px;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    z-index: 10000;
}

.waitlist-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Waitlist card - centered */
.waitlist-card {
    position: relative;
    max-width: 400px;
    width: 90%;
    margin: 100px auto 60px;
    padding: 0;
}

/* Dark theme for waitlist modal content */
.waitlist-overlay .auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.waitlist-overlay .auth-header h2 {
    color: #ffffff !important;
    font-size: 24px;
    font-weight: 500;
    margin: 0 0 8px 0;
    font-family: "Inter", sans-serif;
}

.waitlist-overlay .auth-header p {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 14px;
    margin: 0;
}

.waitlist-overlay .form-group {
    margin-bottom: 16px;
}

.waitlist-overlay .form-group label {
    display: block;
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}

.waitlist-overlay .form-group input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
    transition: all 0.2s;
}

.waitlist-overlay .form-group input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4) !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.waitlist-overlay .form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

/* Role selection - dark theme */
.waitlist-overlay .role-label {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.waitlist-overlay .role-label:hover {
    border-color: rgba(255, 255, 255, 0.3) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.waitlist-overlay .role-option input:checked + .role-label {
    border-color: #FF9900 !important;
    background: rgba(255, 153, 0, 0.1) !important;
}

.waitlist-overlay .role-option input:checked + .role-label::before {
    background: #FF9900 !important;
}

.waitlist-overlay .role-title {
    color: #ffffff !important;
}

.waitlist-overlay .role-desc {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Submit button - white with dark text (like header) */
.waitlist-overlay .btn-submit-white {
    width: 100%;
    background: #ffffff !important;
    color: #000000 !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 12px 24px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    transition: all 0.2s ease;
}

.waitlist-overlay .btn-submit-white:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2) !important;
}

.waitlist-overlay .btn-submit-white .arrow {
    display: inline !important;
    font-size: 14px;
    transition: transform 0.2s ease;
}

.waitlist-overlay .btn-submit-white:hover .arrow {
    transform: translate(2px, -2px);
}

/* Role group label */
.waitlist-overlay .role-group-label {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    margin-bottom: 12px;
    font-weight: 500;
}

/* Form row for side-by-side fields */
.waitlist-overlay .form-row {
    display: flex;
    gap: 12px;
}

.waitlist-overlay .form-row .form-group {
    flex: 1;
}

/* Success state - dark theme */
.waitlist-overlay .waitlist-success h2 {
    color: #ffffff !important;
}

.waitlist-overlay .waitlist-success p {
    color: rgba(255, 255, 255, 0.6) !important;
}

.waitlist-overlay .waitlist-position {
    background: rgba(255, 153, 0, 0.1) !important;
    border: 1px solid rgba(255, 153, 0, 0.3) !important;
}

.waitlist-overlay .waitlist-position span {
    color: rgba(255, 255, 255, 0.5) !important;
}

.waitlist-overlay .waitlist-position strong {
    color: #FF9900 !important;
}

/* Hide step indicator for single-step form */
.waitlist-overlay .step-indicator,
.waitlist-overlay .progress-steps {
    display: none !important;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .waitlist-overlay .waitlist-brand {
        top: 16px;
        left: 16px;
    }

    .waitlist-close {
        top: 16px;
        right: 16px;
    }

    .waitlist-card {
        margin-top: 80px;
        padding: 0 16px;
        width: calc(100% - 32px);
    }

    .waitlist-overlay .form-row {
        flex-direction: column;
        gap: 0;
    }

    .waitlist-overlay .auth-header h2 {
        font-size: 22px;
    }
}

/* ==========================================
   HEADER WAITLIST BUTTON
   ========================================== */

/* Join Waitlist Button - Clean white style */
.btn-waitlist {
    background: #ffffff;
    border: none;
    color: #000000;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-waitlist:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.btn-waitlist .arrow {
    font-size: 14px;
    transition: transform 0.2s ease;
}

.btn-waitlist:hover .arrow {
    transform: translate(2px, -2px);
}

/* Waitlist Modal - Mobile First */
.waitlist-modal {
    max-width: 440px;
    width: 94%;
    margin: 16px;
    padding: 24px 20px;
    max-height: 90vh;
    overflow-y: auto;
}

/* Progress Steps - Hidden for single step */
.progress-steps {
    display: none;
}

.step-indicator {
    display: none;
}

/* Form Row - Stack on mobile, side by side on desktop */
.form-row {
    display: flex;
    flex-direction: column;
    gap: 0;
}

@media (min-width: 480px) {
    .form-row {
        flex-direction: row;
        gap: 12px;
    }

    .form-row .form-group {
        flex: 1;
    }
}

/* Form Group Spacing */
#waitlist-form .form-group {
    margin-bottom: 16px;
}

#waitlist-form .form-group label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.9);
}

#waitlist-form .form-group input {
    padding: 12px 14px;
    font-size: 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    -webkit-appearance: none;
}

#waitlist-form .form-group input:focus {
    border-color: #FF9900;
    background: rgba(255, 153, 0, 0.08);
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.1);
}

#waitlist-form .form-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Role Selection - Clean, professional cards */
.role-selection {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 0;
}

@media (min-width: 480px) {
    .role-selection {
        flex-direction: row;
        gap: 12px;
    }
}

.role-option {
    flex: 1;
    position: relative;
}

.role-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.role-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 70px;
}

.role-label:hover {
    border-color: rgba(255, 153, 0, 0.4);
    background: rgba(255, 153, 0, 0.06);
}

.role-option input:checked + .role-label {
    border-color: #FF9900;
    background: rgba(255, 153, 0, 0.12);
}

.role-option input:checked + .role-label::before {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    background: #FF9900;
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
    background-size: 12px;
    background-position: center;
    background-repeat: no-repeat;
}

.role-icon {
    display: none;
}

.role-title {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
}

.role-desc {
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    line-height: 1.3;
}

/* Form Actions */
.form-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

/* Old orange button - keeping for fallback */
.btn-submit {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #FF9900 0%, #FF6600 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(255, 153, 0, 0.35);
}

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

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* White submit button - matches header style */
.btn-submit-white {
    width: 100%;
    padding: 14px 24px;
    background: #ffffff;
    border: none;
    border-radius: 50px;
    color: #000000;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    -webkit-tap-highlight-color: transparent;
}

.btn-submit-white:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.3);
}

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

.btn-submit-white:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-submit-white .arrow {
    font-size: 14px;
    transition: transform 0.2s ease;
}

.btn-submit-white:hover .arrow {
    transform: translate(2px, -2px);
}

/* Loading state for white button */
.btn-submit-white.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn-submit-white.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* Hide continue button - single step form now */
.btn-continue {
    display: none;
}

.btn-back {
    display: none;
}

/* Step Content */
.step-content {
    display: none;
}

.step-content.active {
    display: block;
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Select Dropdown */
.form-group select {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' fill-opacity='0.5' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.form-group select:focus {
    outline: none;
    border-color: #FF9900;
    box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.1);
}

.form-group select option {
    background: #1a1a1a;
    color: #fff;
    padding: 12px;
}

/* Success State */
.waitlist-success {
    text-align: center;
    padding: 32px 16px;
}

.success-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
    animation: scaleIn 0.4s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.waitlist-success h2 {
    color: #fff;
    font-size: 22px;
    margin-bottom: 10px;
    font-weight: 600;
}

.waitlist-success p {
    color: rgba(255, 255, 255, 0.65);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.waitlist-position {
    display: inline-block;
    background: rgba(255, 153, 0, 0.1);
    border: 1px solid rgba(255, 153, 0, 0.25);
    border-radius: 8px;
    padding: 14px 28px;
    margin-bottom: 20px;
}

.waitlist-position span {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.waitlist-position strong {
    color: #FF9900;
    font-size: 28px;
    font-weight: 700;
}

.btn-share {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-share:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Skip Button - Hidden */
.btn-skip-details {
    display: none;
}

/* Loading State */
.btn-submit.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn-submit.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Error State */
.form-group.error input,
.form-group.error select {
    border-color: #f44336;
}

.error-message {
    color: #f44336;
    font-size: 12px;
    margin-top: 6px;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
}

.toast.error {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
}

.toast button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

/* Mobile Responsive - Optimized for smaller screens */
@media (max-width: 480px) {
    .waitlist-modal {
        padding: 20px 16px;
        margin: 8px;
        width: calc(100% - 16px);
        max-height: 95vh;
        border-radius: 12px;
    }

    .auth-header h2 {
        font-size: 22px;
        margin-bottom: 4px;
    }

    .auth-header p {
        font-size: 13px;
        margin-bottom: 20px;
    }

    #waitlist-form .form-group {
        margin-bottom: 14px;
    }

    #waitlist-form .form-group label {
        font-size: 13px;
        margin-bottom: 5px;
    }

    #waitlist-form .form-group input {
        padding: 11px 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .role-label {
        padding: 14px 10px;
        min-height: auto;
    }

    .role-title {
        font-size: 14px;
    }

    .role-desc {
        font-size: 11px;
    }

    .btn-submit {
        padding: 13px 16px;
        font-size: 15px;
    }

    .form-actions {
        margin-top: 16px;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .waitlist-modal {
        padding: 16px 12px;
    }

    .role-selection {
        gap: 8px;
    }

    .role-label {
        padding: 12px 8px;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    #waitlist-form .form-group input,
    .form-group select {
        font-size: 16px; /* Prevents zoom */
    }
}
