/**
 * Menu mobile, pannello off-canvas di Astra
 * Figma "Atlantic menu" w063nJEH1q0HYYz8DPp9wF, nodi 331:3, 326:256, 331:59
 * (markup aggiuntivo in inc/navigation/mobile-menu.php)
 */
:root {
    --mgs-mm-ink: #001a35;
    --mgs-mm-blue: #2b81b2;
    --mgs-mm-line: #d9e0e8;
    --mgs-mm-open: #ecf3f8;
    --mgs-mm-outline: #5b7284;
    --mgs-mm-font: 'Work Sans', sans-serif;
    /* icone Material: close, add, remove, chevron_right */
    --mgs-mm-icon-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E");
    --mgs-mm-icon-add: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z'/%3E%3C/svg%3E");
    --mgs-mm-icon-remove: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 13H5v-2h14v2z'/%3E%3C/svg%3E");
    --mgs-mm-icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z'/%3E%3C/svg%3E");
}

/* struttura del pannello: intestazione, voci, fondo spinto in basso */
#ast-mobile-popup .ast-mobile-popup-inner {
    display: flex;
    flex-direction: column;
    background: #fff;
}
/* !important: all'apertura Astra scrive display:block inline (frontend.js) */
.ast-header-break-point #ast-mobile-popup .ast-mobile-popup-content {
    display: flex !important;
}
#ast-mobile-popup .ast-mobile-popup-content {
    flex: 1 0 auto;
    flex-direction: column;
    padding: 0;
}

/* intestazione: logo a sinistra, X di Astra a destra */
#ast-mobile-popup .mgs-mm-header {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    height: 52px;
    padding: 12px;
    border-bottom: 1px solid var(--mgs-mm-line);
    background: #fff;
}
#ast-mobile-popup .mgs-mm-logo {
    display: block;
    height: 100%;
    max-height: 39.36px;
}
#ast-mobile-popup .mgs-mm-logo img {
    display: block;
    width: auto;
    height: 100%;
    max-width: 223px;
}
#ast-mobile-popup .ast-mobile-popup-header {
    display: flex;
    align-items: center;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
    box-sizing: border-box;
    height: 51px;
    padding: 0 12px;
}
#ast-mobile-popup #menu-toggle-close {
    display: flex;
    width: 24px;
    height: 24px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}
/* bordo di focus solo da tastiera (!important: Megiston Inclusive mette il bordo a ogni button:focus) */
#ast-mobile-popup #menu-toggle-close:focus:not(:focus-visible),
#ast-mobile-popup #ast-hf-mobile-menu .ast-menu-toggle:focus:not(:focus-visible) {
    border: 0 !important;
    outline: 0;
}
#ast-mobile-popup #menu-toggle-close .ast-svg-iconset {
    display: none;
}
#ast-mobile-popup #menu-toggle-close::before {
    content: "";
    width: 24px;
    height: 24px;
    background-color: var(--mgs-mm-ink);
    -webkit-mask: var(--mgs-mm-icon-close) center / 24px 24px no-repeat;
    mask: var(--mgs-mm-icon-close) center / 24px 24px no-repeat;
}

/* voci di primo livello */
#ast-mobile-popup .ast-builder-menu-mobile,
#ast-mobile-popup .ast-builder-menu-mobile .main-header-bar-navigation,
#ast-mobile-popup .ast-builder-menu-mobile .main-navigation {
    width: 100%;
    margin: 0;
    padding: 0;
}
#ast-mobile-popup #ast-hf-mobile-menu {
    margin: 0;
    padding: 48px 0 0;
    border: 0;
}
#ast-mobile-popup #ast-hf-mobile-menu > .menu-item {
    position: relative;
    margin: 0;
    border: 0;
    border-bottom: 1px solid var(--mgs-mm-line);
    background: #fff;
}
#ast-mobile-popup #ast-hf-mobile-menu > .menu-item > .menu-link {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    height: 58px;
    padding: 0 50px 0 20px;
    border: 0;
    font-family: var(--mgs-mm-font);
    font-size: 14px;
    font-weight: 500;
    line-height: normal;
    letter-spacing: 1.12px;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--mgs-mm-ink);
}
#ast-mobile-popup #ast-hf-mobile-menu > .menu-item.ast-submenu-expanded {
    background: var(--mgs-mm-open);
}
#ast-mobile-popup #ast-hf-mobile-menu > .menu-item.ast-submenu-expanded > .menu-link {
    font-weight: 600;
    color: var(--mgs-mm-blue);
}
#ast-mobile-popup #ast-hf-mobile-menu .menu-link .ast-icon,
#ast-mobile-popup #ast-hf-mobile-menu .dropdown-menu-toggle {
    display: none;
}

/* il pulsante di Astra copre tutta la riga: la voce apre e chiude, + / − a destra */
#ast-mobile-popup #ast-hf-mobile-menu > .menu-item > .ast-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 58px;
    margin: 0;
    padding: 0 20px;
    border: 0;
    background: transparent;
    color: var(--mgs-mm-ink);
    transform: none;
}
#ast-mobile-popup #ast-hf-mobile-menu > .menu-item > .ast-menu-toggle .ast-icon {
    display: none;
}
#ast-mobile-popup #ast-hf-mobile-menu > .menu-item > .ast-menu-toggle::before {
    content: "";
    width: 22px;
    height: 22px;
    background-color: currentColor;
    -webkit-mask: var(--mgs-mm-icon-add) center / 22px 22px no-repeat;
    mask: var(--mgs-mm-icon-add) center / 22px 22px no-repeat;
}
#ast-mobile-popup #ast-hf-mobile-menu > .menu-item.ast-submenu-expanded > .ast-menu-toggle {
    color: var(--mgs-mm-blue);
}
#ast-mobile-popup #ast-hf-mobile-menu > .menu-item.ast-submenu-expanded > .ast-menu-toggle::before {
    -webkit-mask-image: var(--mgs-mm-icon-remove);
    mask-image: var(--mgs-mm-icon-remove);
}

/* foto della voce aperta */
#ast-mobile-popup .mgs-mm-photo {
    padding: 0 20px 6px;
}
#ast-mobile-popup #ast-hf-mobile-menu > .menu-item:not(.ast-submenu-expanded) > .mgs-mm-photo {
    display: none;
}
#ast-mobile-popup .mgs-mm-photo img {
    display: block;
    width: 100%;
    height: 130px;
    border-radius: 4px;
    object-fit: cover;
}

/* sottovoci */
#ast-mobile-popup #ast-hf-mobile-menu .sub-menu {
    margin: 0;
    padding: 0 0 12px;
    border: 0;
    background: transparent;
    box-shadow: none;
}
#ast-mobile-popup #ast-hf-mobile-menu .sub-menu .menu-item {
    margin: 0;
    border: 0;
    background: transparent;
}
#ast-mobile-popup #ast-hf-mobile-menu .sub-menu .menu-link {
    display: flex;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
    height: 44px;
    padding: 0 20px 0 36px;
    border: 0;
    font-family: var(--mgs-mm-font);
    font-size: 14px;
    font-weight: 400;
    line-height: normal;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    color: var(--mgs-mm-ink);
}
#ast-mobile-popup #ast-hf-mobile-menu .sub-menu .menu-link::after {
    content: "";
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-left: auto;
    background-color: var(--mgs-mm-blue);
    -webkit-mask: var(--mgs-mm-icon-chevron) center / 18px 18px no-repeat;
    mask: var(--mgs-mm-icon-chevron) center / 18px 18px no-repeat;
}

/* fondo: pulsanti di prenotazione */
#ast-mobile-popup .mgs-mm-footer {
    margin-top: auto;
}
#ast-mobile-popup .mgs-mm-booking {
    display: flex;
    padding: 0 12px;
}
#ast-mobile-popup .mgs-mm-btn {
    display: flex;
    flex: 1 0 0;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-sizing: border-box;
    min-width: 0;
    height: 39px;
    padding: 8px 20px 8px 12px;
    border: 0;
    font-family: var(--mgs-mm-font);
    font-size: 10px;
    font-weight: 400;
    line-height: normal;
    letter-spacing: normal;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
}
#ast-mobile-popup .mgs-mm-btn--primary {
    background: var(--mgs-mm-blue);
    color: #fff;
}
#ast-mobile-popup .mgs-mm-btn--secondary {
    border: 1px solid var(--mgs-mm-outline);
    background: #fff;
    color: var(--mgs-mm-ink);
}
#ast-mobile-popup .mgs-mm-icon {
    display: block;
    flex-shrink: 0;
}

/* fondo: lingue e contatti */
#ast-mobile-popup .mgs-mm-links {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 12px 12px;
}
#ast-mobile-popup .mgs-mm-languages,
#ast-mobile-popup .mgs-mm-contacts {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}
#ast-mobile-popup .mgs-mm-languages {
    gap: 6px;
}
#ast-mobile-popup .mgs-mm-contacts {
    gap: 12px;
    margin-left: auto;
}
#ast-mobile-popup .mgs-mm-languages li,
#ast-mobile-popup .mgs-mm-contacts li {
    margin: 0;
}
#ast-mobile-popup .mgs-mm-languages a {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 38px;
    height: 30px;
    border: 1px solid var(--mgs-mm-ink);
    font-family: var(--mgs-mm-font);
    font-size: 11px;
    font-weight: 500;
    line-height: normal;
    letter-spacing: 0.88px;
    text-decoration: none;
    color: var(--mgs-mm-ink);
}
#ast-mobile-popup .mgs-mm-languages a.is-active {
    background: var(--mgs-mm-ink);
    color: #fff;
}
#ast-mobile-popup .mgs-mm-contacts a {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 30px;
    height: 30px;
    border: 1px solid var(--mgs-mm-blue);
    border-radius: 15px;
    color: var(--mgs-mm-blue);
}
