/**
 * Conversion Optimization Enhancements - Mobile-First
 * Lightweight CSS for trust signals, sticky CTAs, and conversion elements
 * Zero JavaScript dependencies for core styling
 */

/* ===== Trust Signal Banner (Mobile-First) ===== */
.trust-banner {
    background: linear-gradient(135deg, rgba(57, 255, 20, 0.08), rgba(0, 212, 255, 0.08));
    border: 1px solid rgba(57, 255, 20, 0.2);
    border-radius: 12px;
    padding: 20px 15px;
    margin: 30px auto;
    max-width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.trust-banner-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
}

.trust-banner-item i {
    color: var(--plasma-green);
    font-size: 1rem;
}

.trust-banner-item span {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

/* Desktop: horizontal layout */
@media (min-width: 769px) {
    .trust-banner {
        padding: 20px 30px;
        max-width: 1200px;
    }
    .trust-banner-item {
        font-size: 0.95rem;
    }
}

/* ===== Enhanced CTA Buttons ===== */
.cta-enhanced {
    position: relative;
    overflow: hidden;
}

.cta-enhanced::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.cta-enhanced:hover::before {
    width: 300px;
    height: 300px;
}

.cta-enhanced .arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

.cta-enhanced:hover .arrow {
    transform: translateX(5px);
}

/* Pulsing glow animation for primary CTAs */
@keyframes ctaPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(57, 255, 20, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(57, 255, 20, 0.6);
    }
}

.cta-primary-enhanced {
    animation: ctaPulse 3s ease-in-out infinite;
}

/* ===== Sticky CTA Bar (used by /compare/opentable, /resy, /toast) =====
   Bottom-pinned banner on every viewport (no more top-banner-on-desktop /
   bottom-on-mobile inconsistency). Slides up smoothly, respects iPhone
   safe-area, and uses 44px tap targets.
*/
.sticky-cta-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, rgba(10, 10, 18, 0.92) 0%, rgba(5, 5, 12, 0.98) 100%);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid rgba(0, 212, 255, 0.28);
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px));
    z-index: 900;
    box-shadow: 0 -8px 32px rgba(0, 212, 255, 0.18);
    opacity: 0;
    transform: translateY(110%);
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 0.4s;
}
.sticky-cta-bar.visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s;
}

.sticky-cta-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: nowrap;
}

.sticky-cta-text {
    flex: 1;
    min-width: 0;
    color: var(--starlight, #e0e0ff);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sticky-cta-text .highlight {
    color: var(--plasma-green, #39ff14);
    font-weight: 700;
}

.sticky-cta-button {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 26px;
    background: linear-gradient(135deg, var(--plasma-green, #39ff14), var(--electric-blue, #00d4ff));
    color: var(--dark-matter, #0a0a0a);
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 6px 20px rgba(57, 255, 20, 0.28), 0 0 12px rgba(0, 212, 255, 0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.sticky-cta-button:hover,
.sticky-cta-button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(57, 255, 20, 0.42), 0 0 18px rgba(0, 212, 255, 0.32);
    outline: none;
}

.sticky-cta-dismiss {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1em;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.sticky-cta-dismiss:hover,
.sticky-cta-dismiss:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
    outline: none;
}

@media (max-width: 600px) {
    .sticky-cta-bar { padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px)); }
    .sticky-cta-content { gap: 10px; }
    .sticky-cta-text { font-size: 0.85rem; }
    .sticky-cta-button { padding: 10px 18px; font-size: 0.85rem; }
    .sticky-cta-dismiss { width: 38px; height: 38px; }
}

/* ===== Exit Intent Modal ===== */
.exit-intent-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.exit-intent-modal.active {
    display: flex;
}

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

.exit-intent-content {
    background: linear-gradient(135deg, rgba(45, 27, 105, 0.95), rgba(10, 10, 10, 0.95));
    border: 2px solid rgba(0, 212, 255, 0.4);
    border-radius: 20px;
    padding: 30px 20px;
    max-width: 500px;
    width: 100%;
    position: relative;
    animation: slideUp 0.4s ease;
    box-shadow: 0 20px 60px rgba(0, 212, 255, 0.3);
    /* Make the modal scrollable when content is taller than the viewport
       (short phones, landscape, zoomed text). Without this the close
       button gets pushed off-screen on small devices and the modal
       becomes a trap. */
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Subtle scrollbar styling so it doesn't clash with the dark UI. */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 212, 255, 0.4) transparent;
}
.exit-intent-content::-webkit-scrollbar { width: 6px; }
.exit-intent-content::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.4);
    border-radius: 3px;
}
.exit-intent-content::-webkit-scrollbar-track { background: transparent; }
.exit-intent-content:focus { outline: none; }

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

.exit-intent-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
    z-index: 2;
}

.exit-intent-close:hover,
.exit-intent-close:focus-visible {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: rotate(90deg);
    outline: none;
}
.exit-intent-close:focus-visible {
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.5);
}

.exit-intent-icon {
    font-size: 3rem;
    color: var(--electric-blue);
    text-align: center;
    margin-bottom: 20px;
}

.exit-intent-title {
    font-size: 1.8rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--electric-orange), var(--electric-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.exit-intent-subtitle {
    font-size: 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 25px;
    line-height: 1.6;
}

.exit-intent-savings {
    background: rgba(57, 255, 20, 0.1);
    border: 1px solid rgba(57, 255, 20, 0.3);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 25px;
    text-align: center;
}

.exit-intent-savings-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.exit-intent-savings-amount {
    font-size: 2rem;
    font-weight: 900;
    color: var(--plasma-green);
}

.exit-intent-cta-primary {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, var(--electric-orange), var(--nebula-pink));
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.exit-intent-cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 107, 0, 0.5);
}

.exit-intent-cta-secondary {
    width: 100%;
    padding: 12px 32px;
    background: transparent;
    color: var(--electric-blue);
    border: 2px solid var(--electric-blue);
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.exit-intent-cta-secondary:hover {
    background: var(--electric-blue);
    color: var(--dark-matter);
}

.exit-intent-note {
    font-size: 0.85rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 15px;
}

/* Desktop: larger modal */
@media (min-width: 769px) {
    .exit-intent-content {
        padding: 40px 50px;
        max-width: 550px;
    }

    .exit-intent-title {
        font-size: 2.2rem;
    }

    .exit-intent-subtitle {
        font-size: 1.1rem;
    }
}

/* ===== Feature Advantage Cards ===== */
.advantage-cards-section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.advantage-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.advantage-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 16px;
    padding: 30px 25px;
    transition: all 0.3s ease;
}

.advantage-card:hover {
    transform: translateY(-5px);
    border-color: var(--electric-blue);
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.2);
}

.advantage-card-icon {
    font-size: 2.5rem;
    color: var(--plasma-green);
    margin-bottom: 15px;
}

.advantage-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--electric-blue);
    margin-bottom: 12px;
}

.advantage-card-facts {
    margin-bottom: 20px;
}

.advantage-card-fact {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    font-size: 0.95rem;
}

.advantage-card-fact i {
    color: var(--plasma-green);
    margin-top: 3px;
    flex-shrink: 0;
}

.advantage-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--electric-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.advantage-card-cta:hover {
    color: var(--electric-orange);
    gap: 12px;
}

.advantage-card-cta i {
    transition: transform 0.3s ease;
}

.advantage-card-cta:hover i {
    transform: translateX(3px);
}

/* Desktop: 3-column grid */
@media (min-width: 769px) {
    .advantage-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }
}

/* ===== Utility Classes ===== */
.text-center {
    text-align: center;
}

.mb-sm {
    margin-bottom: 20px;
}

.mb-md {
    margin-bottom: 40px;
}

.mb-lg {
    margin-bottom: 60px;
}

.mt-sm {
    margin-top: 20px;
}

.mt-md {
    margin-top: 40px;
}

/* Accessibility: Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
