/* Waitlist page styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #000000;
    --primary-hover: #1a1a1a;
    --accent: #5b5ddb; /* Improved contrast - WCAG AA compliant */
    --accent-light: #7577e8;
    --text-primary: #1f2937;
    --text-secondary: #4b5563; /* Improved contrast from #6b7280 - WCAG AA compliant */
    --text-muted: #6b7280; /* Improved from #9ca3af */
    --background: #ffffff;
    --surface: #f9fafb;
    --border: #e5e7eb;
    --border-focus: #5b5ddb;
    --success: #059669; /* Improved contrast from #10b981 */
    --error: #dc2626; /* Improved contrast from #ef4444 */
    --driver-accent: #047857; /* Improved contrast from #059669 */
    --rider-accent: #5b5ddb; /* Improved contrast */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.waitlist-container {
    min-height: 100vh;
    position: relative;
}

/* Background */
.background-gradient {
    position: fixed;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    z-index: 0;
    opacity: 0.05;
    pointer-events: none;
}

/* Header */
.waitlist-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.logo-link {
    text-decoration: none;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--text-primary);
}

/* Main Content */
.waitlist-main {
    padding-top: 80px;
    min-height: 100vh;
}

.waitlist-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: calc(100vh - 80px);
}

/* Form Section */
.form-section {
    padding: 3rem;
    max-width: 560px;
    margin: 0 auto;
}

.form-header {
    margin-bottom: 2rem;
}

.form-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* Accessibility: Screen reader only class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Accessibility: Visible focus indicators */
:focus {
    outline: 2px solid var(--accent, #6366f1);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--accent, #6366f1);
    outline-offset: 2px;
}

/* Error Summary */
.error-summary {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.error-summary ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.error-summary li {
    margin-bottom: 0.5rem;
}

.error-summary a {
    color: var(--error);
    text-decoration: underline;
    font-weight: 500;
}

.error-summary a:hover {
    text-decoration: none;
}

/* User Type Fieldset */
.user-type-fieldset {
    border: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

/* User Type Toggle */
.user-type-toggle {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 0.375rem;
    background: var(--surface);
    border-radius: 12px;
}

.toggle-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1rem;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.toggle-btn:hover,
.toggle-btn:active {
    color: var(--text-primary);
}

.toggle-btn.active {
    background: var(--background);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.toggle-btn.active[data-type="rider"] {
    color: var(--rider-accent);
}

.toggle-btn.active[data-type="driver"] {
    color: var(--driver-accent);
}

.toggle-icon {
    width: 20px;
    height: 20px;
}

/* Benefits Preview */
.benefits-preview {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--surface);
    border-radius: 10px;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 500;
}

.benefit-item.rider-benefit {
    color: var(--rider-accent);
}

.benefit-item.driver-benefit {
    color: var(--driver-accent);
}

.benefit-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Form */
.waitlist-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.optional-label {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--background);
    color: var(--text-primary);
    transition: all 0.2s ease;
    outline: none;
}

.form-input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* Validation States */
.form-input.input-error {
    border-color: var(--error);
    background-color: rgba(239, 68, 68, 0.02);
}

.form-input.input-error:focus {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-input.input-success {
    border-color: var(--success);
    background-color: rgba(16, 185, 129, 0.02);
}

.form-input.input-success:focus {
    border-color: var(--success);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.field-error {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.375rem;
    font-size: 0.8125rem;
    color: var(--error);
    animation: slideIn 0.2s ease-out;
}

.field-error svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success checkmark for valid inputs */
.form-group {
    position: relative;
}

.form-input.input-success ~ .validation-icon,
.form-input.input-success::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3e%3c/path%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

/* Phone Input */
.phone-input-wrapper {
    display: flex;
    gap: 0.5rem;
}

.country-select {
    width: 80px;
    padding: 0.875rem 0.5rem;
    font-size: 0.875rem;
    font-family: inherit;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
}

.country-select:focus {
    border-color: var(--border-focus);
}

.phone-input {
    flex: 1;
}

/* Driver Fields */
.driver-fields {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
}

/* Checkbox */
.checkbox-group {
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1.5;
}

.checkbox-label input {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 5px;
    flex-shrink: 0;
    margin-top: 1px;
    position: relative;
    transition: all 0.2s;
    background: var(--background);
}

.checkbox-label input:checked + .checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-label input:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-text {
    color: var(--text-secondary);
}

.link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.link:hover {
    text-decoration: underline;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-appearance: none;
    appearance: none;
    margin-top: 0.5rem;
    position: relative;
}

.submit-btn:hover:not(:disabled),
.submit-btn:active:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.submit-btn.loading .btn-text {
    opacity: 0;
}

.btn-spinner {
    position: absolute;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Form Message */
.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    display: none;
}

.form-message.show {
    display: block;
}

.form-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.form-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Waitlist Count */
.waitlist-count {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.waitlist-count svg {
    color: var(--accent);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    max-width: 480px;
    color: white;
}

.hero-badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.rider-hero .hero-badge {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}

.driver-hero .hero-badge {
    background: rgba(5, 150, 105, 0.2);
    color: #6ee7b7;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
}

.hero-features svg {
    width: 20px;
    height: 20px;
    color: var(--success);
    flex-shrink: 0;
}

/* Earnings Preview */
.earnings-preview {
    margin-top: 2rem;
}

.earnings-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.earnings-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.6);
}

.earnings-amount {
    font-size: 1.75rem;
    font-weight: 700;
    color: #6ee7b7;
}

.earnings-note {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Responsive */
@media (max-width: 1024px) {
    .waitlist-content {
        grid-template-columns: 1fr;
    }

    .hero-section {
        display: none;
    }

    .form-section {
        max-width: 100%;
        padding: 2rem 1.5rem;
    }

    .background-gradient {
        width: 100%;
        opacity: 0.03;
    }
}

@media (max-width: 640px) {
    .waitlist-header {
        padding: 1rem;
    }

    .form-title {
        font-size: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .toggle-btn {
        padding: 0.75rem;
        font-size: 0.875rem;
    }

    .toggle-btn span {
        display: none;
    }

    .toggle-icon {
        width: 24px;
        height: 24px;
    }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #f9fafb;
        --text-secondary: #9ca3af;
        --text-muted: #6b7280;
        --background: #111827;
        --surface: #1f2937;
        --border: #374151;
    }

    .waitlist-header {
        background: rgba(17, 24, 39, 0.9);
        border-color: var(--border);
    }

    .background-gradient {
        opacity: 0.1;
    }

    .form-input {
        background: var(--surface);
    }

    .country-select {
        background: var(--surface);
    }

    .submit-btn {
        background: white;
        color: #111827;
    }

    .submit-btn:hover:not(:disabled) {
        background: #f3f4f6;
    }

    .checkbox-custom {
        background: var(--surface);
    }

    .checkbox-label input:checked + .checkbox-custom {
        background: white;
        border-color: white;
    }

    .checkbox-label input:checked + .checkbox-custom::after {
        border-color: #111827;
    }
}

/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 1.5rem 2rem;
    background: rgba(29, 29, 31, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3);
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.4s ease, 
                visibility 0.4s ease;
}

.cookie-consent-banner.visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.cookie-consent-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-consent-content {
    flex: 1;
    min-width: 280px;
}

.cookie-consent-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cookie-consent-title svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.cookie-consent-text {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
    max-width: 700px;
}

.cookie-consent-text a {
    color: #667eea;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.cookie-consent-text a:hover {
    color: #8b9eff;
}

.cookie-consent-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    white-space: nowrap;
    font-family: inherit;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.cookie-btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(102, 126, 234, 0.5);
}

.cookie-btn-decline {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cookie-btn-decline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .cookie-consent-banner {
        padding: 1.25rem 1.5rem;
    }

    .cookie-consent-container {
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
    }

    .cookie-consent-actions {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
        text-align: center;
        padding: 1rem 1.5rem;
    }
}
