/* MiVetOnline – Navegación móvil */

:root {
    --mvo-nav-bar-height: 70px;
    --mvo-nav-bg: #ffffff;
    --mvo-nav-accent: #2f8fa3;
    --mvo-nav-text: #60717a;
    --mvo-nav-border: #e7eef1;
    --mvo-nav-shadow: 0 -8px 28px rgba(31, 71, 82, 0.12);
    --mvo-nav-surface: color-mix(in srgb, var(--mvo-nav-bg) 96%, transparent);
}

.mvo-mobile-nav,
.mvo-more-overlay {
    display: none;
}

    /* Aislamiento frente al box-sizing y estilos globales del tema. */
    .mvo-mobile-nav,
    .mvo-mobile-nav *,
    .mvo-mobile-nav *::before,
    .mvo-mobile-nav *::after,
    .mvo-more-overlay,
    .mvo-more-overlay *,
    .mvo-more-overlay *::before,
    .mvo-more-overlay *::after {
        box-sizing: border-box;
    }

    body.mvo-mobile-nav-enabled {
        padding-bottom: calc(var(--mvo-nav-bar-height) + env(safe-area-inset-bottom, 0px)) !important;
    }

    body.mvo-mobile-nav-enabled.mvo-has-brand-logo {
        padding-bottom: calc(var(--mvo-nav-bar-height) + 10px + env(safe-area-inset-bottom, 0px)) !important;
    }

    body.mvo-mobile-nav-enabled.mvo-sheet-open,
    html.mvo-sheet-open {
        overflow: hidden !important;
        overscroll-behavior: none;
    }

    body.mvo-mobile-nav-enabled.mvo-keyboard-open {
        padding-bottom: 0 !important;
    }

    .mvo-mobile-nav {
        position: fixed;
        z-index: 999998;
        right: 0;
        bottom: 0;
        left: 0;
        display: block;
        width: 100%;
        height: calc(var(--mvo-nav-bar-height) + env(safe-area-inset-bottom, 0px));
        min-height: 0;
        max-height: calc(var(--mvo-nav-bar-height) + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
        border-top: 1px solid var(--mvo-nav-border);
        background: var(--mvo-nav-surface);
        box-shadow: var(--mvo-nav-shadow);
        -webkit-backdrop-filter: blur(18px) saturate(145%);
        backdrop-filter: blur(18px) saturate(145%);
        isolation: isolate;
        transition: transform 180ms ease, opacity 180ms ease;
    }

    @supports not (background: color-mix(in srgb, white 50%, transparent)) {
        :root {
            --mvo-nav-surface: rgba(255, 255, 255, 0.98);
        }
    }

    .mvo-mobile-nav__brand {
        position: absolute;
        z-index: 2;
        top: -35px;
        left: max(10px, env(safe-area-inset-left, 0px));
        display: flex;
        width: 124px;
        height: 35px;
        padding: 4px 8px 3px;
        align-items: center;
        justify-content: center;
        overflow: visible;
        border: 0;
        border-radius: 14px 14px 0 0;
        background: var(--mvo-nav-surface);
        box-shadow: 0 -6px 16px rgba(31, 71, 82, 0.10);
        -webkit-backdrop-filter: blur(18px) saturate(145%);
        backdrop-filter: blur(18px) saturate(145%);
        isolation: isolate;
        text-decoration: none !important;
        -webkit-tap-highlight-color: transparent;
        transition: transform 140ms ease, box-shadow 140ms ease;
    }

    /* Curvas laterales que unen visualmente la pestaña con la barra. */
    .mvo-mobile-nav__brand::before,
    .mvo-mobile-nav__brand::after {
        position: absolute;
        z-index: -1;
        bottom: 0;
        width: 18px;
        height: 18px;
        content: "";
        pointer-events: none;
        background: var(--mvo-nav-surface);
        -webkit-backdrop-filter: blur(18px) saturate(145%);
        backdrop-filter: blur(18px) saturate(145%);
    }

    .mvo-mobile-nav__brand::before {
        left: -18px;
        -webkit-mask: radial-gradient(18px at 0 0, transparent 17px, #000 17.5px);
        mask: radial-gradient(18px at 0 0, transparent 17px, #000 17.5px);
    }

    .mvo-mobile-nav__brand::after {
        right: -18px;
        -webkit-mask: radial-gradient(18px at 100% 0, transparent 17px, #000 17.5px);
        mask: radial-gradient(18px at 100% 0, transparent 17px, #000 17.5px);
    }

    .mvo-mobile-nav__brand:hover,
    .mvo-mobile-nav__brand:focus-visible {
        box-shadow: 0 -6px 18px rgba(31, 71, 82, 0.15);
        outline: none;
    }

    .mvo-mobile-nav__brand:active {
        transform: scale(0.97);
    }

    .mvo-mobile-nav__brand img {
        position: relative;
        z-index: 2;
        display: block;
        width: 108px;
        max-width: 100%;
        height: auto;
        max-height: 27px;
        object-fit: contain;
    }

    body.mvo-keyboard-open .mvo-mobile-nav {
        pointer-events: none;
        transform: translateY(115%);
        opacity: 0;
    }

    .mvo-mobile-nav__inner {
        position: relative;
        z-index: 4;
        display: grid;
        grid-template-columns: repeat(var(--mvo-item-count, 4), minmax(0, 1fr));
        align-items: end;
        width: 100%;
        max-width: 680px;
        height: var(--mvo-nav-bar-height);
        min-height: 0;
        margin: 0 auto;
        padding: 5px max(5px, env(safe-area-inset-left, 0px)) 3px max(5px, env(safe-area-inset-right, 0px));
    }

    .mvo-nav-item {
        position: relative;
        display: flex;
        min-width: 0;
        min-height: 56px;
        margin: 0;
        padding: 3px 2px 1px;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        border: 0;
        border-radius: 15px;
        outline: none;
        background: transparent;
        color: var(--mvo-nav-text);
        font-family: inherit;
        font-size: 11px;
        font-style: normal;
        font-weight: 650;
        line-height: 1.1;
        text-align: center;
        text-decoration: none !important;
        -webkit-tap-highlight-color: transparent;
        appearance: none;
        cursor: pointer;
        transition: color 150ms ease, background-color 150ms ease, transform 120ms ease;
    }

    /* Todos los botones normales se muestran en tono oscuro uniforme. */
    .mvo-nav-item:not(.is-featured) {
        color: #263238;
    }

    .mvo-nav-item:not(.is-featured):hover,
    .mvo-nav-item:not(.is-featured):focus-visible,
    .mvo-nav-item:not(.is-featured).is-active {
        color: #263238;
        background: color-mix(in srgb, var(--mvo-nav-accent) 8%, transparent);
    }

    .mvo-nav-item:active {
        transform: scale(0.96);
    }

    /* Un destino aún no configurado no se atenúa visualmente. */
    .mvo-nav-item.is-disabled {
        opacity: 1;
        color: #263238;
        cursor: default;
    }

    .mvo-nav-item__icon {
        position: relative;
        display: grid;
        width: 28px;
        height: 28px;
        place-items: center;
    }

    .mvo-nav-item__icon svg {
        display: block;
        width: 25px;
        height: 25px;
    }

    .mvo-nav-item__icon-image {
        display: block;
        width: 25px;
        height: 25px;
        object-fit: contain;
    }

    .mvo-nav-item__label {
        display: block;
        width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mvo-nav-item__badge {
        position: absolute;
        top: -6px;
        right: -10px;
        display: grid;
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        place-items: center;
        border: 2px solid var(--mvo-nav-bg);
        border-radius: 999px;
        background: #e55353;
        color: #fff;
        font-size: 10px;
        font-weight: 800;
        line-height: 1;
    }

    .mvo-nav-item.is-featured {
        padding-top: 0;
        color: var(--mvo-nav-accent);
    }

    .mvo-nav-item.is-featured .mvo-nav-item__icon {
        width: 48px;
        height: 48px;
        margin-top: -22px;
        padding: 5px;
        border: 4px solid var(--mvo-nav-bg);
        border-radius: 50%;
        background: linear-gradient(180deg, #f8fffc 0%, #e9f8f2 100%);
        box-shadow: 0 8px 18px rgba(42, 117, 131, 0.14);
        color: var(--mvo-nav-accent);
    }

    .mvo-nav-item.is-featured .mvo-nav-item__icon-image {
        width: 33px;
        height: 33px;
        filter: drop-shadow(0 1px 0 rgba(255,255,255,0.35));
    }

    .mvo-nav-item.is-featured .mvo-nav-item__icon svg {
        width: 26px;
        height: 26px;
    }

    .mvo-nav-item.is-featured:hover,
    .mvo-nav-item.is-featured:focus-visible,
    .mvo-nav-item.is-featured.is-active {
        background: transparent;
    }

    .mvo-nav-item.is-featured:active .mvo-nav-item__icon {
        transform: scale(0.94);
    }

    /* Panel Más */
    .mvo-more-overlay {
        position: fixed;
        z-index: 999999;
        inset: 0;
        display: block;
        pointer-events: none;
        visibility: hidden;
        opacity: 0;
        transition: visibility 0s linear 260ms, opacity 220ms ease;
    }

    .mvo-more-overlay.is-open {
        pointer-events: auto;
        visibility: visible;
        opacity: 1;
        transition-delay: 0s;
    }

    .mvo-more-overlay__backdrop {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
        border: 0;
        background: rgba(10, 25, 31, 0.48);
        -webkit-backdrop-filter: blur(3px);
        backdrop-filter: blur(3px);
        cursor: default;
    }

    .mvo-more-sheet {
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
        display: flex;
        width: 100%;
        max-width: 720px;
        max-height: min(86vh, 760px);
        margin: 0 auto;
        padding: 0 max(14px, env(safe-area-inset-right, 0px)) calc(15px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px));
        flex-direction: column;
        overflow: hidden;
        border-radius: 25px 25px 0 0;
        outline: none;
        background: #f7fafb;
        box-shadow: 0 -24px 80px rgba(7, 31, 39, 0.28);
        transform: translateY(104%);
        transition: transform 260ms cubic-bezier(0.22, 0.75, 0.25, 1);
    }

    .mvo-more-overlay.is-open .mvo-more-sheet {
        transform: translateY(0);
    }

    .mvo-more-sheet__handle {
        width: 44px;
        height: 5px;
        margin: 9px auto 5px;
        flex: 0 0 auto;
        border-radius: 999px;
        background: #c8d4d9;
    }

    .mvo-more-sheet__header {
        display: flex;
        padding: 9px 2px 15px;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        border-bottom: 1px solid #e6edef;
    }

    .mvo-more-sheet__header h2 {
        margin: 0;
        color: #21343b;
        font-size: clamp(20px, 5vw, 25px);
        font-weight: 760;
        line-height: 1.2;
    }

    .mvo-more-sheet__header p {
        margin: 4px 0 0;
        color: #708087;
        font-size: 13px;
        line-height: 1.35;
    }

    .mvo-more-sheet__close {
        display: grid;
        width: 42px;
        height: 42px;
        min-width: 42px;
        margin: 0;
        padding: 0;
        place-items: center;
        border: 1px solid #dce6e9;
        border-radius: 50%;
        background: #fff;
        color: #53666e;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .mvo-more-sheet__close svg {
        width: 21px;
        height: 21px;
    }

    .mvo-more-sheet__close:focus-visible {
        outline: 3px solid color-mix(in srgb, var(--mvo-nav-accent) 28%, transparent);
        outline-offset: 2px;
    }

    .mvo-more-sheet__content {
        overflow-y: auto;
        padding: 15px 0 0;
        overscroll-behavior: contain;
        scrollbar-width: thin;
    }

    .mvo-more-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .mvo-more-card {
        display: grid;
        min-height: 72px;
        padding: 12px;
        grid-template-columns: 39px minmax(0, 1fr) 18px;
        align-items: center;
        gap: 9px;
        border: 1px solid #e2eaed;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 4px 14px rgba(25, 58, 68, 0.045);
        color: #30464e;
        text-decoration: none !important;
        -webkit-tap-highlight-color: transparent;
        transition: border-color 150ms ease, box-shadow 150ms ease, transform 120ms ease;
    }

    .mvo-more-card:hover,
    .mvo-more-card:focus-visible,
    .mvo-more-card.is-active {
        border-color: color-mix(in srgb, var(--mvo-nav-accent) 36%, #e2eaed);
        box-shadow: 0 6px 18px color-mix(in srgb, var(--mvo-nav-accent) 10%, transparent);
        color: var(--mvo-nav-accent);
    }

    .mvo-more-card:active {
        transform: scale(0.98);
    }

    .mvo-more-card__icon {
        display: grid;
        width: 39px;
        height: 39px;
        place-items: center;
        border-radius: 12px;
        background: color-mix(in srgb, var(--mvo-nav-accent) 10%, #fff);
        color: var(--mvo-nav-accent);
    }

    .mvo-more-card__icon svg {
        width: 22px;
        height: 22px;
    }

    .mvo-more-card__icon-image {
        display: block;
        width: 24px;
        height: 24px;
        object-fit: contain;
    }

    .mvo-more-card__label {
        overflow: hidden;
        font-size: 13px;
        font-weight: 680;
        line-height: 1.25;
    }

    .mvo-more-card__arrow {
        color: #a2b0b5;
    }

    .mvo-more-card__arrow svg {
        width: 17px;
        height: 17px;
    }

    .mvo-more-card.is-danger {
        color: #9e3e42;
    }

    .mvo-more-card.is-danger .mvo-more-card__icon {
        background: #fff0f0;
        color: #b64b50;
    }

    .mvo-more-legal {
        margin-top: 17px;
        padding: 16px 4px 5px;
        border-top: 1px solid #e3eaed;
        color: #78878d;
        text-align: center;
    }

    .mvo-more-legal__links {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 7px;
        font-size: 12px;
        line-height: 1.5;
    }

    .mvo-more-legal a {
        color: #586c74;
        text-decoration: underline;
        text-decoration-color: #bac6ca;
        text-underline-offset: 3px;
    }

    .mvo-more-legal p {
        margin: 8px 0 0;
        font-size: 11px;
    }

    /* Oculta únicamente el disparador y panel móvil de Astra. Conserva el logo. */
    body.mvo-hide-astra-mobile-menu .ast-mobile-header-wrap .menu-toggle,
    body.mvo-hide-astra-mobile-menu .ast-mobile-header-wrap .ast-button-wrap,
    body.mvo-hide-astra-mobile-menu .ast-mobile-header-content,
    body.mvo-hide-astra-mobile-menu .ast-builder-menu-mobile,
    body.mvo-hide-astra-mobile-menu [data-section="section-header-mobile-trigger"],
    body.mvo-hide-astra-mobile-menu .main-header-menu-toggle {
        display: none !important;
    }

    /* Evita que avisos fijos comunes queden por debajo de la barra. */
    body.mvo-mobile-nav-enabled .woocommerce-store-notice,
    body.mvo-mobile-nav-enabled .elementor-location-popup {
        z-index: 1000000;
    }

@media (max-width: 390px) {
    .mvo-mobile-nav__brand {
        top: -32px;
        width: 112px;
        height: 33px;
        padding-right: 7px;
        padding-left: 7px;
    }

    .mvo-mobile-nav__brand img {
        width: 98px;
        max-height: 25px;
    }

    .mvo-nav-item {
        font-size: 10px;
    }

    .mvo-nav-item__icon svg {
        width: 23px;
        height: 23px;
    }

    .mvo-nav-item__icon-image {
        width: 23px;
        height: 23px;
    }

    .mvo-more-card {
        min-height: 68px;
        padding: 10px;
        grid-template-columns: 36px minmax(0, 1fr) 16px;
        gap: 7px;
    }

    .mvo-more-card__icon {
        width: 36px;
        height: 36px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mvo-mobile-nav,
    .mvo-nav-item,
    .mvo-more-overlay,
    .mvo-more-sheet,
    .mvo-more-card {
        transition-duration: 0.01ms !important;
    }
}
