/* Custom premium animations & overrides for Güero Barbacoa */

/* Hide standard scrollbars but keep scrolling functional */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Base custom font configuration fallback */
body {
    font-family: 'Montserrat', 'Inter', sans-serif;
    background-color: #fff8f7;
    color: #271816;
    overflow-x: hidden;
}

/*
 * View switcher panel and transitions.
 *
 * Hide-only-when-inactive — let the element's natural display (from
 * Tailwind utilities like .flex, or the tag's default block) win when
 * .active is present. Avoids clashing with `flex flex-col` on the
 * welcome screen (specificity bug from the original code).
 */
.view-panel:not(.active),
.view-panel-flex:not(.active) {
    display: none !important;
}

.view-panel,
.view-panel-flex {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-panel.active,
.view-panel-flex.active {
    opacity: 1;
    transform: translateY(0);
}

/* Safe Area Insets for modern mobile displays */
.pb-safe {
    padding-bottom: env(safe-area-inset-bottom, 16px);
}
.pt-safe {
    padding-top: env(safe-area-inset-top, 16px);
}

/* iOS-safe full viewport height (dvh tracks the visible viewport;
 * vh on iOS includes the address bar and creates a hueco arriba). */
@supports (height: 100dvh) {
    .min-h-screen { min-height: 100dvh; }
}

/* Toast Toaster System */
#toast-container {
    position: fixed;
    top: calc(16px + env(safe-area-inset-top, 0px));
    right: 16px;
    left: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    pointer-events: none;
}
@media (min-width: 640px) {
    #toast-container {
        left: auto;
        right: 24px;
        top: calc(24px + env(safe-area-inset-top, 0px));
    }
}

.toast {
    pointer-events: auto;
    background: rgba(255, 248, 247, 0.96);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1.5px solid #af101a;
    border-left: 6px solid #af101a;
    box-shadow: 0 12px 30px rgba(175, 16, 26, 0.12);
    border-radius: 12px;
    padding: 14px 16px;
    width: 100%;
    max-width: 360px;
    display: flex;
    align-items: center;
    gap: 14px;
    transform: translateX(120%);
    animation: slideInToast 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.removing {
    animation: slideOutToast 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInToast {
    to {
        transform: translateX(0);
    }
}

@keyframes slideOutToast {
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* Pulse highlight for active items */
.pulse-primary {
    box-shadow: 0 0 0 0 rgba(175, 16, 26, 0.4);
    animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(175, 16, 26, 0.5);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(175, 16, 26, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(175, 16, 26, 0);
    }
}

/* Floating Switcher Bar - Quick Portal Switcher.
 * On mobile sit above the bottom nav so they don't overlap. */
#global-view-switcher {
    position: fixed;
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    right: 16px;
    z-index: 100;
}
@media (min-width: 768px) {
    #global-view-switcher {
        bottom: 24px;
        right: 24px;
    }
}

.switcher-btn {
    background: #af101a;
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(175, 16, 26, 0.25);
    transition: all 0.2s ease;
}

.switcher-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 28px rgba(175, 16, 26, 0.35);
}

.switcher-menu {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    background: #fff8f7;
    border: 1px solid #e4beba;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(39, 24, 22, 0.12);
    width: 240px;
    overflow: hidden;
    transform: scale(0.9);
    opacity: 0;
    pointer-events: none;
    transform-origin: bottom right;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.switcher-menu.active {
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
}

/* Confetti particles animation */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #fdd34d;
    position: fixed;
    top: -10px;
    z-index: 9999;
    pointer-events: none;
    border-radius: 50%;
    animation: confettiFall 3s linear forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(105vh) rotate(720deg);
        opacity: 0;
    }
}

/* Active navigation item highlight in sidebar */
.active-nav-item {
    background-color: #af101a !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(175, 16, 26, 0.2) !important;
}

/* Dynamic radar-like pulse for kitchen cards */
.pulse-radar {
    position: relative;
}
.pulse-radar::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 2px solid #ba1a1a;
    animation: radarRipple 1.5s cubic-bezier(0.25, 0, 0, 1) infinite;
    opacity: 0;
}
@keyframes radarRipple {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.06);
        opacity: 0;
    }
}

/* Category chip active style */
.category-chip-active {
    background-color: #fdd34d !important;
    color: #725b00 !important;
    border-color: #fdd34d !important;
}

/* Salsa active cards */
.salsa-active {
    background-color: #fdd34d !important;
    color: #725b00 !important;
    border-color: #fdd34d !important;
    box-shadow: 0 4px 12px rgba(253, 211, 77, 0.15) !important;
}
.salsa-active div {
    background-color: #ffffff !important;
}

/* ----------------------------------------------------------
 * Poster card — versión digital del cartel del local.
 * ---------------------------------------------------------- */
.poster-card {
    background:
        radial-gradient(circle at 110% -10%, rgba(245, 166, 35, 0.18), transparent 45%),
        radial-gradient(circle at -10% 110%, rgba(245, 166, 35, 0.15), transparent 45%),
        linear-gradient(135deg, #1f3cff 0%, #1430d6 100%);
    color: #ffffff;
}

.poster-title {
    color: #ff2a32;
    text-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    letter-spacing: -0.02em;
}

.poster-pill {
    display: inline-block;
    padding: 0.35rem 1.25rem;
    border-radius: 9999px;
    background-color: #f5a623;
    color: #2b1700;
    font-weight: 900;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.poster-block {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 1.1rem 1.1rem 1.25rem;
    backdrop-filter: blur(6px);
    text-align: left;
}

.poster-block ul li {
    color: rgba(255, 255, 255, 0.92);
}

.poster-blob {
    position: absolute;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, #f5a623 0%, rgba(245, 166, 35, 0) 70%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.55;
    filter: blur(2px);
}

.poster-blob-tr {
    top: -80px;
    right: -60px;
}

.poster-blob-bl {
    bottom: -90px;
    left: -70px;
}

@media (max-width: 640px) {
    .poster-blob { width: 160px; height: 160px; }
}
