/* Professional Registration Modal - Two-Column Layout */

/* Modal Backdrop - hidden by default to prevent flash on page load */
.suggestregistration-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
    pointer-events: none;
}

.suggestregistration-modal-backdrop.show {
    display: flex;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Light theme toggle */
body.light-mode .suggestregistration-modal-backdrop {
    background: rgba(0, 0, 0, 0.4);
}

/* Privacy Consent Checkbox */
.privacy-consent {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 123, 255, 0.05);
    border: 1px solid rgba(0, 123, 255, 0.2);
    border-radius: 8px;
}

.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.checkbox-wrapper input[type="checkbox"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    accent-color: #007bff;
    cursor: pointer;
}

.checkbox-label {
    flex: 1;
    cursor: pointer;
    line-height: 1.5;
    color: #333;
}

.migration-preview {
    font-weight: bold;
    color: #007bff !important;
}

.privacy-note {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Light theme adjustments */
body.light-mode .privacy-consent {
    background: rgba(0, 123, 255, 0.08);
    border-color: rgba(0, 123, 255, 0.3);
}

body.light-mode .checkbox-label {
    color: #555;
}

body.light-mode .privacy-note {
    color: #777;
}

/* Soft Nudge Banner - Contextually positioned */
.soft-nudge-banner {
    position: relative;
    z-index: 1000;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    margin: 10px 0;
    border-radius: 8px;
}

/* Header banner specific styling */
.soft-nudge-banner.header-banner {
    position: relative;
    flex-grow: 1;
    margin: 0 24px;
    padding: 8px 16px;
    background: rgba(102, 126, 234, 0.1);
    color: var(--text-color);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 6px;
    font-size: 13px;
    box-shadow: none;
    max-width: none;
    display: flex;
    align-items: center;
}

.soft-nudge-banner.header-banner .banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.soft-nudge-banner.header-banner .banner-icon {
    font-size: 12px;
}

.soft-nudge-banner.header-banner .banner-text {
    font-size: 12px;
    line-height: 1.3;
}

.soft-nudge-banner.header-banner .banner-text strong {
    font-weight: 600;
}

.soft-nudge-banner.header-banner .banner-cta {
    padding: 4px 8px;
    font-size: 11px;
    background: var(--color-accent);
    border-radius: 4px;
}

.soft-nudge-banner.header-banner .banner-dismiss {
    position: relative;
    right: auto;
    top: auto;
    padding: 2px 6px;
    font-size: 14px;
    background: none;
    color: var(--text-color);
    opacity: 0.7;
}

.soft-nudge-banner.show {
    opacity: 1;
    transform: translateY(0);
}

.soft-nudge-banner.hiding,
.soft-nudge-banner.auto-hiding {
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.banner-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.banner-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.banner-text strong {
    font-weight: 600;
}

.banner-cta {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.banner-cta:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.banner-dismiss {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.banner-dismiss:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Tablet and smaller desktop responsive handling */
@media (max-width: 1024px) {
    .soft-nudge-banner.header-banner {
        margin: 0 12px;
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .soft-nudge-banner.header-banner .banner-text {
        font-size: 11px;
    }
    
    .soft-nudge-banner.header-banner .banner-cta {
        padding: 3px 6px;
        font-size: 10px;
    }
}

/* Desktop: Hide nudge banner by default (only show in header context) */
@media (min-width: 769px) {
    .soft-nudge-banner:not(.header-banner) {
        display: none;
    }
}

/* Mobile responsiveness for banner */
@media (max-width: 768px) {
    /* Hide header banner on mobile to avoid crowding */
    .soft-nudge-banner.header-banner {
        display: none;
    }
    
    .soft-nudge-banner {
        position: fixed;
        bottom: 70px; /* Above bottom navigation */
        left: 8px;
        right: 8px;
        margin: 0;
        padding: 8px 12px;
        border-radius: 8px;
        box-shadow: 0 2px 12px rgba(0,0,0,0.15);
        transform: translateY(100px);
        min-height: auto;
    }
    
    .soft-nudge-banner.show {
        transform: translateY(0);
    }
    
    .soft-nudge-banner.hiding,
    .soft-nudge-banner.auto-hiding {
        transform: translateY(100px);
    }
    
    .banner-content {
        gap: 8px;
        align-items: center;
    }
    
    .banner-icon {
        font-size: 14px;
        flex-shrink: 0;
    }
    
    .banner-text {
        font-size: 11px;
        line-height: 1.3;
        flex: 1;
    }
    
    .banner-text strong {
        font-weight: 600;
    }
    
    .banner-cta {
        padding: 4px 8px;
        font-size: 10px;
        border-radius: 4px;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .banner-dismiss {
        padding: 2px 4px;
        font-size: 14px;
        flex-shrink: 0;
        min-width: 20px;
        text-align: center;
    }
}

/* Extra small phones (iPhone SE, etc.) - further compact the banner */
@media (max-width: 420px) {
    .soft-nudge-banner {
        left: 6px;
        right: 6px;
        padding: 6px 10px;
        bottom: 65px;
    }
    
    .banner-content {
        gap: 6px;
    }
    
    .banner-icon {
        font-size: 12px;
    }
    
    .banner-text {
        font-size: 10px;
        line-height: 1.2;
    }
    
    .banner-cta {
        padding: 3px 6px;
        font-size: 9px;
    }
    
    .banner-dismiss {
        font-size: 12px;
        min-width: 18px;
    }
}

/* Desktop banner positioning - no margin adjustments needed since it's inline */

/* Modal Container - Two Column Layout */
.registration-modal {
    background: #1e293b !important;
    border-radius: 12px;
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    max-width: 900px !important;
    width: 92% !important;
    overflow: hidden;
    border: 1px solid #334155;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    min-height: auto !important;
    transform: scale(0.95) translateY(30px);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: #e2e8f0;
}

body.light-mode .registration-modal {
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    color: #1e293b;
}

.suggestregistration-modal-backdrop.show .registration-modal {
    transform: scale(1) translateY(0);
}

/* Left Column - Subtle Gray Gradient */
.left-column {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    color: #1d1d1f;
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* Dark mode: darker gray gradient */
body:not(.light-mode) .left-column {
    background: linear-gradient(135deg, #1a1a1a 0%, #151515 100%);
    color: #f5f5f7;
}

body:not(.light-mode) .savings-highlight {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

/* Scoped: do not target header / sitewide .logo (e.g. UK calculator, FAQ img.logo). */
.logo-container .logo {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.logo-container .logo-icon {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 6px;
    position: relative;
}

.logo-container .logo-icon::after {
    content: '₹';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: 700;
}

.left-column h1,
.left-column h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.03em;
    position: relative;
    z-index: 1;
    margin-top: 0;
    line-height: 1.2;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-align: center;
}

.left-column p {
    font-size: 15px;
    opacity: 0.85;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
    line-height: 1.4;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-align: center;
}

.savings-highlight {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    padding: 12px 16px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.savings-highlight .amount {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 3px;
}

.savings-highlight .description {
    font-size: 12px;
    opacity: 0.85;
}

/* Right Column */
.right-column {
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #1e293b;
}


body.light-mode .right-column {
    background: white;
}

.section-title {
    font-size: 17px;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 10px;
    margin-top: 0;
    text-align: left;
    letter-spacing: -0.02em;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body:not(.light-mode) .section-title {
    color: #f5f5f7;
}


/* Features Grid */
.features-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 16px;
}

.feature-item {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    padding: 8px 0;
    border-radius: 0;
    transition: all 0.2s ease;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: transparent;
    cursor: default;
    gap: 10px;
}

.feature-item:last-child {
    border-bottom: none;
}

body.light-mode .feature-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

body.light-mode .feature-item:last-child {
    border-bottom: none;
}

body:not(.light-mode) .feature-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body:not(.light-mode) .feature-item:last-child {
    border-bottom: none;
}

.feature-bullet {
    color: #007AFF;
    font-size: 18px;
    line-height: 1;
    font-weight: 400;
    flex-shrink: 0;
    margin-top: 1px;
}

.feature-title {
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    margin-bottom: 2px;
    letter-spacing: -0.01em;
    line-height: 1.3;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body:not(.light-mode) .feature-title {
    color: #f5f5f7;
}

.feature-description {
    font-size: 13px;
    color: #6e6e73;
    line-height: 1.4;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body:not(.light-mode) .feature-description {
    color: #a1a1a6;
}

/* CTA Section */
.cta-section {
    text-align: center;
}

.primary-button {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    letter-spacing: -0.01em;
}

.primary-button:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.primary-button:active {
    transform: translateY(0);
    background: #1d4ed8;
}

.secondary-button {
    background: transparent;
    color: #94a3b8;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s ease;
    text-decoration: underline;
}

body.light-mode .secondary-button {
    color: #64748b;
}

.secondary-button:hover {
    color: #cbd5e1;
}

body.light-mode .secondary-button:hover {
    color: #475569;
}

.trust-text {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 8px;
    text-align: center;
}

body.light-mode .trust-text {
    color: #64748b;
}

/* Suggest registration modal — Google / Email (matches peer auth gate pattern) */
.suggest-registration-cta {
    text-align: left;
}

.suggest-modal-google-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: #f5f5f7;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
    margin-bottom: 10px;
    transition: background 0.15s ease, border-color 0.15s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.suggest-modal-google-btn:hover {
    color: #f5f5f7;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.28);
}

body.light-mode .suggest-modal-google-btn {
    border-color: rgba(0, 0, 0, 0.12);
    background: #fff;
    color: #1d1d1f;
}

body.light-mode .suggest-modal-google-btn:hover {
    background: #f5f5f7;
    border-color: rgba(0, 0, 0, 0.2);
}

.suggest-modal-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
    font-size: 12px;
    margin: 4px 0 12px;
}

.suggest-modal-divider::before,
.suggest-modal-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

body.light-mode .suggest-modal-divider {
    color: #64748b;
}

body.light-mode .suggest-modal-divider::before,
body.light-mode .suggest-modal-divider::after {
    background: rgba(0, 0, 0, 0.1);
}

.suggest-modal-email-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: none;
    background: #3b82f6;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 10px;
    transition: background 0.15s ease, opacity 0.15s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.suggest-modal-email-btn:hover {
    background: #2563eb;
}

.suggest-modal-signin-row {
    margin: 0 0 12px;
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
}

body.light-mode .suggest-modal-signin-row {
    color: #64748b;
}

.suggest-modal-signin-link {
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    padding: 0;
}

.suggest-modal-signin-em {
    color: #93c5fd;
    text-decoration: underline;
}

body.light-mode .suggest-modal-signin-em {
    color: #2563eb;
}

/* Pulse animation removed for cleaner Apple-like aesthetic */

/* Mobile responsive */
@media (max-width: 768px) {
    .registration-modal {
        grid-template-columns: 1fr;
        max-width: 360px;
        width: 95%;
        margin: 10px;
        min-height: auto;
        max-height: 85vh;
        overflow-y: auto;
    }
    
    .left-column {
        padding: 20px 16px;
        text-align: center;
        min-height: auto;
    }
    
    .right-column {
        padding: 20px 16px;
    }
    
    .features-grid {
        gap: 0;
    }

    .feature-item {
        padding: 14px 0;
    }

    .feature-bullet {
        font-size: 18px;
    }

    .left-column h1,
    .left-column h2 {
        font-size: 28px;
        margin-bottom: 12px;
    }

    .left-column p {
        font-size: 15px;
        margin-bottom: 20px;
    }

    .section-title {
        font-size: 18px;
        margin-bottom: 16px;
    }

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

    .feature-description {
        font-size: 13px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group input {
        padding: 12px;
        font-size: 14px;
    }
    
    .submit-btn {
        padding: 12px;
        font-size: 14px;
    }
    
    .modal-close {
        top: 10px;
        right: 12px;
        font-size: 20px;
    }
}

/* Extra small phones (iPhone SE, small screens) */
@media (max-width: 420px) {
    .registration-modal {
        max-width: 320px;
        width: 98%;
        margin: 5px;
        max-height: 90vh;
        border-radius: 12px;
    }
    
    .left-column {
        padding: 16px 12px;
    }
    
    .right-column {
        padding: 16px 12px;
    }
    
    .left-column h1,
    .left-column h2 {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .left-column p {
        font-size: 14px;
        margin-bottom: 16px;
    }

    .section-title {
        font-size: 17px;
        margin-bottom: 12px;
    }

    .feature-item {
        padding: 12px 0;
    }

    .feature-bullet {
        font-size: 16px;
    }

    .feature-title {
        font-size: 13px;
    }

    .feature-description {
        font-size: 12px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group input {
        padding: 10px;
        font-size: 13px;
    }
    
    .submit-btn {
        padding: 10px;
        font-size: 13px;
    }
    
    .modal-close {
        top: 8px;
        right: 10px;
        font-size: 18px;
        width: 28px;
        height: 28px;
    }
    
    .privacy-consent {
        padding: 10px;
        margin-bottom: 15px;
    }
    
    .features-grid {
        gap: 8px;
    }
}

/* Background blur effect when modal is open */
.main-content-blurred {
    filter: blur(4px) brightness(0.7);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
    user-select: none;
}

body.light-mode .main-content-blurred {
    filter: blur(4px) brightness(0.9);
}

/* Legacy nudge styles (completely hidden) */
.registration-nudge {
    display: none !important;
    visibility: hidden !important;
}