/* Assessment Page Styles - Mobile Optimized */

/* Main Assessment Layout */
.assessment-main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.05) 0%, rgba(108, 92, 231, 0.05) 100%);
    padding-top: 80px;
}

.assessment-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    height: calc(100vh - 80px);
    width: 100%;
}

/* Minimal Navigation */
.nav-minimal {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-back .back-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* Assessment Header */
.assessment-header {
    padding: 2rem 0 1rem;
    text-align: center;
}

.progress-section {
    margin-bottom: 1.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(225, 232, 237, 0.5);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 4px;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.assessment-title h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.assessment-title p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Question Container */
.question-container {
    flex: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 0;
    padding: 1rem 0;
    overflow-y: auto;
    width: 100%;
    position: relative;
}

/* Scroll indicator for mobile */
.question-container::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.9));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.question-container.has-scroll::after {
    opacity: 1;
}

.question {
    width: 100%;
    max-width: 600px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
    padding: 0 1rem;
}

.question.active {
    opacity: 1;
    transform: translateY(0);
}

/* Question Header with Tooltip */
.question-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 10;
}

.question h3 {
    font-size: 1.4rem;
    line-height: 1.4;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
}

/* Tooltip Styles */
.question-tooltip {
    margin-top: 1rem;
    position: relative;
    display: inline-block;
}

.tooltip-trigger {
    background: rgba(9, 132, 227, 0.1);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #0984e3;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.tooltip-trigger:hover {
    background: rgba(9, 132, 227, 0.2);
    transform: translateY(-1px);
}

.tooltip-icon {
    width: 16px;
    height: 16px;
    background: #0984e3;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
}

.tooltip-text {
    font-size: 0.85rem;
}

.tooltip-content {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    padding: 1.25rem;
    max-width: 320px;
    width: max-content;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.tooltip-content.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.tooltip-content p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-primary);
    text-align: left;
}

.tooltip-content::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #dee2e6;
}

.tooltip-content::after {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #f8f9fa;
}

.question-options {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

.option {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

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

.option:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 170, 0.15);
}

.option.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.1) 0%, rgba(108, 92, 231, 0.1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 212, 170, 0.2);
}

.option h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.option p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

/* Assessment Footer */
.assessment-footer {
    padding: 1.5rem 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.assessment-footer .btn {
    flex: 0 0 auto;
    min-width: 120px;
}

.progress-hint {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
}

.progress-hint.hidden {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .assessment-main {
        padding-top: 60px; /* Reduced from 70px */
    }
    
    .assessment-container {
        height: calc(100vh - 60px);
        padding: 0 16px;
        display: flex;
        flex-direction: column;
    }
    
    .assessment-header {
        padding: 0.75rem 0 0.25rem; /* Reduced padding */
        flex-shrink: 0;
    }
    
    .progress-section {
        margin-bottom: 0.75rem; /* Reduced from default */
    }
    
    .progress-bar {
        height: 6px; /* Slightly smaller on mobile */
    }
    
    .assessment-title {
        margin-bottom: 0.25rem; /* Reduced spacing */
    }
    
    .assessment-title h2 {
        font-size: 1.4rem; /* Slightly smaller */
        margin-bottom: 0.2rem;
        line-height: 1.2;
    }
    
    .assessment-title p {
        font-size: 0.85rem; /* Smaller */
        margin-bottom: 0;
        line-height: 1.3;
    }
    
    .social-proof-text {
        margin-top: 0.25rem;
        margin-bottom: 0.5rem;
    }
    
    .social-proof-text p {
        font-size: 0.75rem; /* Smaller */
        padding: 0.3rem 0.8rem;
    }
    
    .question-container {
        padding: 0.25rem 0; /* Minimal padding */
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        /* Add subtle scroll indicator if needed */
        -webkit-overflow-scrolling: touch;
    }
    
    .question {
        padding: 0;
    }
    
    .question-header {
        margin-bottom: 1rem; /* Reduced from 1.5rem */
    }
    
    .question h3 {
        font-size: 1.1rem; /* Slightly smaller */
        margin-bottom: 0.75rem;
        line-height: 1.25;
    }
    
    /* Mobile tooltip adjustments */
    .tooltip-content {
        max-width: 280px;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .tooltip-trigger {
        font-size: 0.75rem; /* Smaller */
        padding: 0.3rem 0.7rem;
    }
    
    .tooltip-icon {
        width: 14px;
        height: 14px;
        font-size: 10px;
    }
    
    .question-options {
        gap: 0.75rem; /* Slightly smaller gap */
    }
    
    .option {
        padding: 0.875rem; /* Optimized padding */
    }
    
    .option h4 {
        font-size: 0.95rem; /* Slightly smaller */
        margin-bottom: 0.3rem;
    }
    
    .option p {
        font-size: 0.8rem; /* Smaller */
        line-height: 1.3;
    }
    
    .assessment-footer {
        padding: 0.75rem 0 1rem; /* Reduced padding */
        flex-direction: column;
        gap: 0.5rem;
        flex-shrink: 0;
        background: white;
        position: relative;
        z-index: 10;
    }
    
    .assessment-footer .btn {
        align-self: flex-start;
        min-width: 100px;
        padding: 0.75rem 1.5rem; /* Smaller button */
        font-size: 0.9rem;
    }
    
    .progress-hint {
        font-size: 0.8rem; /* Smaller */
        order: -1;
        margin: 0;
    }
}

@media (max-width: 480px) {
    .assessment-container {
        padding: 0 12px;
    }
    
    .assessment-header {
        padding: 0.75rem 0 0.25rem;
    }
    
    .progress-section {
        margin-bottom: 1rem;
    }
    
    .progress-text {
        font-size: 0.8rem;
    }
    
    .assessment-title h2 {
        font-size: 1.3rem;
        line-height: 1.2;
    }
    
    .assessment-title p {
        font-size: 0.85rem;
    }
    
    .question-options {
        gap: 0.8rem;
    }
    
    .option {
        padding: 0.8rem;
    }
    
    .question h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .question-tooltip {
        margin-top: 0.5rem;
    }
}

/* Small height screens (landscape mobile) */
@media (max-height: 600px) and (orientation: landscape) {
    .assessment-header {
        padding: 0.5rem 0 0.25rem;
    }
    
    .assessment-title {
        display: none; /* Hide title on very short screens */
    }
    
    .social-proof-text {
        display: none; /* Hide social proof on very short screens */
    }
    
    .progress-section {
        margin-bottom: 0.5rem;
    }
    
    .question h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .question-tooltip {
        margin-top: 0.25rem;
    }
    
    .tooltip-trigger {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    .option {
        padding: 0.6rem;
    }
    
    .option h4 {
        font-size: 0.9rem;
    }
    
    .option p {
        font-size: 0.75rem;
    }
    
    .assessment-footer {
        padding: 0.5rem 0 0.75rem;
    }
}

/* Results Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.4s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
    color: var(--text-primary);
}

.close {
    position: absolute;
    right: 2rem;
    top: 2rem;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

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

.results-container {
    padding: 2rem;
}

.results-hero {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.1) 0%, rgba(108, 92, 231, 0.1) 100%);
    border-radius: 12px;
}

.recommendation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.recommendation-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.strain-list {
    list-style: none;
    padding: 0;
}

.strain-list li {
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--border);
}

.benefits-list {
    display: grid;
    gap: 0.8rem;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.benefit-icon {
    width: 24px;
    height: 24px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    flex-shrink: 0;
}

.recommendation-cta {
    text-align: center;
    padding: 2rem;
    background: var(--surface);
    border-radius: 12px;
}

.price-display {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 1rem 0;
}

.price-display::before {
    content: '$';
    font-size: 2rem;
    vertical-align: top;
}

.price-note {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 2% auto;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .close {
        right: 1.5rem;
        top: 1.5rem;
    }
    
    .results-container {
        padding: 1.5rem;
    }
    
    .recommendation-grid {
        grid-template-columns: 1fr;
    }
    
    .results-hero {
        padding: 1.5rem;
    }
}

/* Email Collection View Styles */
.email-collection-view {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.05) 0%, rgba(108, 92, 231, 0.05) 100%);
}

.email-view-container {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
}

/* Completion Indicator - Compact */
.completion-indicator {
    text-align: center;
    margin-bottom: 1.5rem;
    animation: slideInDown 0.5s ease;
}

.completion-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    margin: 0 auto 0.75rem;
    animation: scaleIn 0.5s ease 0.2s both;
}

.completion-indicator h2 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.completion-indicator p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Social Proof - Compact */
.social-proof-banner {
    background: rgba(0, 212, 170, 0.1);
    border: 1px solid rgba(0, 212, 170, 0.2);
    border-radius: 12px;
    padding: 0.75rem;
    text-align: center;
    margin-bottom: 1.5rem;
    animation: slideInUp 0.5s ease 0.3s both;
}

.social-proof-banner p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.social-proof-banner strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Social proof in assessment header */
.social-proof-text {
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 1rem;
    animation: fadeIn 0.5s ease 0.5s both;
    position: relative;
    z-index: 1;
}

.social-proof-text p {
    background: rgba(0, 212, 170, 0.1);
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    color: var(--text-primary);
    margin: 0;
}

/* Email Content Card - Compact */
.email-content-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    animation: slideInUp 0.5s ease 0.4s both;
}

.email-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.email-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.email-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Email Benefits - Compact */
.email-benefits {
    background: var(--surface);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.email-benefits .benefit-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.email-benefits .benefit-item:last-child {
    margin-bottom: 0;
}

.email-benefits .benefit-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.benefit-text {
    flex: 1;
}

.benefit-text strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.1rem;
    font-size: 0.9rem;
}

.benefit-text span {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.3;
}

/* Email Form */
.email-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

#user-email {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    -webkit-appearance: none;
    appearance: none;
}

#user-email:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

.btn-large {
    width: 100%;
    padding: 1.25rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Trust Indicators */
.trust-indicators {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.trust-icon {
    font-size: 1.2rem;
}

/* Privacy Note */
.privacy-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.privacy-note a {
    color: var(--primary-color);
    text-decoration: none;
}

.privacy-note a:hover {
    text-decoration: underline;
}

/* Error Message */
.error-message {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: #dc3545;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Returning User Note */
.returning-user-note {
    background: rgba(0, 212, 170, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    margin-top: 0.5rem;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-left: 0.5rem;
    vertical-align: middle;
}

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

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

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Mobile Optimizations for Email View */
@media (max-width: 768px) {
    .email-collection-view {
        padding: 0.5rem;
        min-height: 100vh;
    }
    
    .email-view-container {
        max-height: 100vh;
        padding: 0.5rem;
    }
    
    .email-content-card {
        padding: 1.5rem;
    }
    
    .completion-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .completion-indicator {
        margin-bottom: 1rem;
    }
    
    .completion-indicator h2 {
        font-size: 1.4rem;
    }
    
    .completion-indicator p {
        font-size: 0.9rem;
    }
    
    .social-proof-banner {
        margin-bottom: 1rem;
        padding: 0.5rem;
    }
    
    .social-proof-banner p {
        font-size: 0.8rem;
    }
    
    .email-header {
        margin-bottom: 1rem;
    }
    
    .email-header h3 {
        font-size: 1.3rem;
    }
    
    .email-header p {
        font-size: 0.85rem;
    }
    
    .email-benefits {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .email-benefits .benefit-item {
        margin-bottom: 0.5rem;
    }
    
    .benefit-text strong {
        font-size: 0.85rem;
    }
    
    .benefit-text span {
        font-size: 0.75rem;
    }
    
    .trust-indicators {
        gap: 1rem;
        font-size: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .trust-icon {
        font-size: 1rem;
    }
    
    #user-email {
        padding: 0.875rem;
        font-size: 16px;
    }
    
    .btn-large {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .privacy-note {
        font-size: 0.75rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .email-content-card {
        padding: 1.25rem;
    }
    
    /* Hide the 4th benefit on very small screens to save space */
    .email-benefits .benefit-item:nth-child(4) {
        display: none;
    }
    
    .email-benefits .benefit-icon {
        font-size: 1.1rem;
    }
    
    .benefit-text strong {
        font-size: 0.8rem;
    }
    
    .benefit-text span {
        font-size: 0.7rem;
    }
    
    .completion-indicator h2 {
        font-size: 1.25rem;
    }
    
    .email-header h3 {
        font-size: 1.2rem;
    }
}

/* Very small screens (iPhone SE, etc) */
@media (max-width: 375px) and (max-height: 700px) {
    /* Hide social proof on very small screens */
    .social-proof-banner {
        display: none;
    }
    
    /* Make completion indicator inline */
    .completion-indicator {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .completion-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        margin: 0;
    }
    
    .completion-indicator h2 {
        font-size: 1.1rem;
        margin: 0;
    }
    
    .completion-indicator p {
        display: none;
    }
}

/* ==================================================================
   MOBILE EMAIL MODAL CSS FIXES - Added to fix input clearing bug
   ================================================================== */

/* Enhanced Email Modal Styles for Mobile */
.email-modal-content {
    /* Prevent modal from being affected by viewport changes */
    position: relative !important;
    transform: none !important;
    margin: 5vh auto !important;
    
    /* Ensure modal doesn't resize unexpectedly */
    min-height: auto !important;
    max-height: 90vh !important;
    
    /* Improve rendering on mobile */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Enhanced Email Input Styles */
#user-email {
    /* Prevent zoom on iOS when input is focused */
    font-size: 16px !important; /* iOS won't zoom if font-size >= 16px */
    
    /* Disable iOS styling that can interfere */
    -webkit-appearance: none !important;
    -webkit-border-radius: 4px !important;
    
    /* Ensure proper box model */
    box-sizing: border-box !important;
    
    /* Prevent text selection issues */
    -webkit-user-select: text !important;
    user-select: text !important;
    
    /* Improve touch target */
    min-height: 44px !important; /* iOS recommended touch target */
    
    /* Prevent automatic corrections that might interfere */
    autocomplete: email !important;
    autocapitalize: none !important;
    autocorrect: off !important;
    spellcheck: false !important;
    
    /* Ensure consistent rendering */
    background-color: white !important;
    color: #333 !important;
    
    /* Prevent input from being transparent */
    opacity: 1 !important;
    
    /* Smooth transitions */
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Focus state improvements */
#user-email:focus {
    outline: none !important;
    border-color: var(--primary-color, #00D4AA) !important;
    box-shadow: 0 0 0 2px rgba(0, 212, 170, 0.2) !important;
    
    /* Ensure the input remains visible during focus */
    opacity: 1 !important;
    background-color: white !important;
}

/* Mobile-specific modal improvements */
@media screen and (max-width: 768px) {
    .email-modal-content {
        width: 95% !important;
        margin: 2vh auto !important;
        padding: 0 !important;
        
        /* Prevent modal from moving during input focus */
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        
        /* Ensure proper z-index */
        z-index: 10000 !important;
    }
    
    .modal-body {
        padding: 1.5rem !important;
    }
    
    .modal-header {
        padding: 1.5rem 1.5rem 1rem !important;
    }
    
    /* Enhanced input container */
    .form-group {
        position: relative;
    }
    
    /* Prevent label from interfering */
    .form-group label {
        pointer-events: none;
        position: relative;
        z-index: 1;
    }
    
    /* Email input mobile optimizations */
    #user-email {
        width: 100% !important;
        max-width: 100% !important;
        padding: 12px 16px !important;
        font-size: 16px !important; /* Critical: prevents iOS zoom */
        line-height: 1.4 !important;
        
        /* Prevent input width from changing */
        flex-shrink: 0 !important;
        
        /* Ensure proper rendering on older mobile browsers */
        -webkit-text-size-adjust: 100% !important;
    }
    
    /* Button improvements */
    .btn-primary {
        min-height: 48px !important; /* Better touch target */
        font-size: 16px !important;
        padding: 12px 16px !important;
    }
}

/* Very small screens (iPhone SE, etc.) */
@media screen and (max-width: 375px) {
    .email-modal-content {
        width: 98% !important;
        margin: 1vh auto !important;
    }
    
    .modal-body {
        padding: 1rem !important;
    }
    
    .modal-header {
        padding: 1rem 1rem 0.5rem !important;
    }
    
    .modal-header h2 {
        font-size: 1.4rem !important;
    }
}

/* Landscape mobile orientation */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .email-modal-content {
        max-height: 95vh !important;
        overflow-y: auto !important;
        margin: 1vh auto !important;
    }
    
    .modal-body {
        padding: 1rem !important;
    }
    
    .modal-header {
        padding: 1rem 1rem 0.5rem !important;
    }
}

/* Prevent modal background from interfering with input */
.modal {
    /* Ensure modal background doesn't interfere with input events */
    -webkit-tap-highlight-color: transparent;
    
    /* Prevent scrolling issues */
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

/* Fix for iOS Safari input clearing bug */
@supports (-webkit-appearance: none) {
    #user-email {
        /* iOS-specific fixes */
        -webkit-appearance: none !important;
        -webkit-box-shadow: none !important;
        
        /* Prevent iOS from clearing input on viewport changes */
        position: relative !important;
        z-index: 1 !important;
        
        /* Ensure input stays rendered */
        will-change: contents !important;
    }
    
    /* Prevent iOS from optimizing away the input */
    #user-email:focus {
        -webkit-user-select: text !important;
        user-select: text !important;
    }
}

/* Fix for Android Chrome input issues */
@media screen and (-webkit-min-device-pixel-ratio: 1) {
    #user-email {
        /* Android-specific input fixes */
        background-clip: padding-box !important;
        
        /* Prevent input from being optimized away */
        contain: none !important;
    }
}

/* Emergency fallback styles for input preservation */
.email-input-wrapper {
    position: relative;
    isolation: isolate; /* Create new stacking context */
}

.email-input-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: -1;
    background: white;
}

/* Error message improvements */
.error-message {
    font-size: 14px !important;
    line-height: 1.4 !important;
    margin-top: 0.5rem !important;
    padding: 0.5rem !important;
    border-radius: 4px !important;
    background-color: rgba(220, 53, 69, 0.1) !important;
}