/* Metzler Scrolling Shop — floating bottom status bar */

/* Telo dostane spodny padding aby content nebol prekryty barom */
body.has-metzler-bottom-bar {
    padding-bottom: 62px;
}

.metzler-bottom-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9000;
    background: #ffffff;
    border-top: 1px solid #e6e6e6;
    box-shadow: 0 -5px 14px rgba(0, 0, 0, 0.06);
    padding: 6px 10px;
    /* Safe-area inset pre iOS s notch / home indicator */
    padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
}

.metzler-bottom-bar__items {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 14px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.metzler-bottom-bar__items > li {
    margin: 0;
    padding: 0;
}

.metzler-bottom-bar__item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: #1a1a1a;
    padding: 3px 8px;
    border-radius: 10px;
    transition: background 120ms ease, transform 120ms ease;
    min-width: 45px;
}

/* button-typ item (napr. account trigger) - reset native button stylov */
.metzler-bottom-bar__item--button {
    background: transparent;
    border: 0;
    margin: 0;
    font: inherit;
    cursor: pointer;
    line-height: inherit;
}
.metzler-bottom-bar__item--button[aria-expanded="true"] {
    background: #f4f4f4;
}

.metzler-bottom-bar__item:hover,
.metzler-bottom-bar__item:focus-visible {
    background: #f4f4f4;
    color: #1a1a1a;
}

.metzler-bottom-bar__item:active {
    transform: translateY(1px);
}

.metzler-bottom-bar__icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
}

.metzler-bottom-bar__icon {
    width: 22px;
    height: 22px;
    display: block;
    object-fit: contain;
}

.metzler-bottom-bar__count {
    position: absolute;
    top: -5px;
    right: -8px;
    min-width: 14px;
    height: 14px;
    padding: 0 4px;
    border-radius: 999px;
    background: #d62828;
    color: #ffffff;
    font-size: 9px;
    line-height: 14px;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 0 0 2px #ffffff;
    pointer-events: none;
}

.metzler-bottom-bar__count[hidden] {
    display: none !important;
}

/* === Loyalty item — count badge nad ikonou (rovnako ako cart count) === */
/* Zachovava default __count pozicie (top-right overlay), iba upravuje
 * styling pre vyssie hodnoty (15000) ktore by sa nezmestili do default
 * 14×14 cart-count badge. Font-size konfigurovatelny cez settings
 * (CSS variable --metzler-loyalty-badge-font, default 9px). */
.metzler-bottom-bar__item[data-bar-key="loyalty"] .metzler-bottom-bar__count {
    /* top, right zdedene z default __count (top: -5px; right: -8px) */
    min-width: 22px;
    height: auto;
    padding: 1px 5px;
    border-radius: 6px;                  /* zaoblenie - oval-rectangle */
    background: #d62828;
    color: #ffffff;
    font-size: var(--metzler-loyalty-badge-font, 9px);
    line-height: 1.2;
    font-weight: 700;
    box-shadow: 0 0 0 2px #ffffff;
}

.metzler-bottom-bar__label {
    font-size: 9px;
    line-height: 1;
    color: #555;
    font-weight: 500;
    letter-spacing: 0.01em;
}

@media (max-width: 480px) {
    .metzler-bottom-bar__items {
        gap: 6px;
    }
    .metzler-bottom-bar__item {
        min-width: 38px;
        padding: 3px 5px;
    }
}

/* === DESKTOP (≥1024px): bar do top-right rohu === */
/* Pod 1024px ostava bottom layout vyssie (mobile / tablet portrait). */
@media (min-width: 1024px) {
    .metzler-bottom-bar {
        top: 24px;
        right: 32px;
        left: auto;
        bottom: auto;
        width: auto;
        border-top: 0;
        border: 1px solid #e6e6e6;
        border-radius: 999px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
        padding: 8px 14px;
        /* zrus iOS safe-area inset (relevant iba pre bottom bar na mobile) */
        padding-bottom: 8px;
    }
    /* Body uz nepotrebuje rezerva dole - bar nezabera priestor pre obsah */
    body.has-metzler-bottom-bar {
        padding-bottom: 0;
    }
    /* WP admin bar (32px na desktop) - posunieme bar pod neho */
    body.admin-bar .metzler-bottom-bar {
        top: calc(24px + 32px);
    }
    /* Items - mensi gap, kompaktnejsie pri pill shape */
    .metzler-bottom-bar__items {
        gap: 8px;
    }
}
