/**
 * Mobile App-Quality Experience — bottom nav, sticky CTA, snap carousels.
 * Only active below 768px.
 * @since 3.3.0
 */

/* Full-Bleed Hero */
@media (max-width: 767px) {
    .ccec-hero, .hero-section, .hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 4rem; }
}

/* Bottom Navigation Bar */
.ccec-mobile-nav { display: none; }
@media (max-width: 767px) {
    .ccec-mobile-nav {
        display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 9998;
        background: rgba(255,255,255,0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid rgba(0,0,0,0.06); justify-content: space-around;
        padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0px));
    }
    .ccec-mobile-nav__tab {
        display: flex; flex-direction: column; align-items: center; gap: 2px;
        text-decoration: none; font-size: 0.6rem; font-weight: 500;
        color: var(--ccec-mid-grey, #999); padding: 6px 12px; border-radius: 8px;
        min-width: 64px; min-height: 44px; justify-content: center;
        -webkit-tap-highlight-color: transparent; transition: color 0.2s;
    }
    .ccec-mobile-nav__tab.is-active { color: var(--ccec-primary); font-weight: 700; }
    .ccec-mobile-nav__icon {
        width: 22px; height: 22px; border-radius: 6px;
        background: rgba(0,0,0,0.04); display: flex; align-items: center; justify-content: center;
    }
    .ccec-mobile-nav__tab.is-active .ccec-mobile-nav__icon { background: rgba(var(--ccec-primary-rgb), 0.12); }
    .ccec-mobile-nav__icon svg { width: 14px; height: 14px; fill: currentColor; }
    body { padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }
}

/* Sticky Bottom CTA */
.ccec-sticky-cta { display: none; }
@media (max-width: 767px) {
    .ccec-sticky-cta {
        display: block; position: fixed;
        bottom: calc(60px + env(safe-area-inset-bottom, 0px) + 8px);
        left: 12px; right: 12px; z-index: 9997;
        background: var(--ccec-gradient-brand, linear-gradient(135deg, #C86A2E, #9A4A1D));
        color: #fff; padding: 0.7rem 1rem; border-radius: 12px;
        font-size: 0.8rem; font-weight: 700; text-align: center; text-decoration: none;
        box-shadow: 0 8px 28px rgba(var(--ccec-primary-rgb), 0.35);
        transform: translateY(120%); transition: transform 0.5s var(--ccec-ease-spring, cubic-bezier(0.34, 1.56, 0.64, 1));
    }
    .ccec-sticky-cta.is-visible { transform: translateY(0); }
}

/* Scroll-Snap Carousels */
@media (max-width: 767px) {
    .ccec-snap-carousel {
        display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory;
        scroll-padding-left: 1rem; -webkit-overflow-scrolling: touch;
        padding: 0 1rem; margin: 0 -1rem;
        scrollbar-width: none; -ms-overflow-style: none;
    }
    .ccec-snap-carousel::-webkit-scrollbar { display: none; }
    .ccec-snap-carousel > * { scroll-snap-align: start; flex: 0 0 85vw; }
}

/* Spring :active States */
@media (max-width: 767px) {
    a, button, [role="button"], .ccec-card-lift, .ccec-btn-spring { -webkit-tap-highlight-color: transparent; }
    a:active, button:active, [role="button"]:active, .ccec-card-lift:active, .ccec-btn-spring:active {
        transform: scale(0.96); transition: transform 0.08s ease;
    }
}

/* Progressive Disclosure */
.ccec-disclosure { overflow: hidden; }
.ccec-disclosure__summary { cursor: pointer; list-style: none; -webkit-tap-highlight-color: transparent; }
.ccec-disclosure__summary::-webkit-details-marker { display: none; }
.ccec-disclosure__content { padding: 1rem 0; }
@supports (selector(:has(> *))) {
    .ccec-disclosure[open] .ccec-disclosure__content {
        animation: ccec-disclosure-open 0.35s var(--ccec-ease-expo, cubic-bezier(0.16, 1, 0.3, 1));
    }
    @keyframes ccec-disclosure-open { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .ccec-sticky-cta { transition: none; transform: none; }
    a:active, button:active { transform: none; }
}
