/* ============================================================
   Mobile Bottom Navigation – frontend styles v1.3
   ============================================================ */

#mbn-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 99999;
    background-color: var(--mbn-bg, #ffffff);
    border-top: 1px solid var(--mbn-border, #e0e0e0);
    box-shadow: 0 -2px 10px rgba(0,0,0,.08);
    -webkit-tap-highlight-color: transparent;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.mbn-list {
    display: flex;
    align-items: stretch;
    margin: 0; padding: 0;
    list-style: none;
    width: 100%;
}

.mbn-item {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.mbn-logo-item {
    flex: 0 0 auto;
    border-right: 1px solid var(--mbn-border, #e0e0e0);
}

.mbn-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    min-height: 56px;
    text-decoration: none;
}

.mbn-logo-img {
    height: 28px; width: auto;
    max-width: 80px;
    object-fit: contain;
    display: block;
}

.mbn-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: var(--mbn-text, #444444);
    padding: 8px 4px;
    width: 100%;
    min-height: 56px;
    transition: opacity .15s;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    background: none; border: none;
    cursor: pointer;
    font-family: inherit; font-size: inherit;
}

.mbn-link:hover,
.mbn-link:focus { opacity: .65; color: var(--mbn-text,#444); text-decoration: none; }

.mbn-link:focus-visible {
    outline: 2px solid var(--mbn-text, #444);
    outline-offset: -2px;
    border-radius: 2px;
}

.mbn-icon {
    display: flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; flex-shrink: 0;
}
.mbn-icon svg { width: 24px; height: 24px; display: block; }

.mbn-label {
    font-size: 10px; line-height: 1.2;
    text-align: center;
    color: var(--mbn-text, #444444);
    white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
    max-width: 64px; display: block;
}

#mbn-spacer {
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    display: block;
}

/* ── DRAWER ─────────────────────────────────────────────────── */

#mbn-drawer {
    position: fixed;
    left: 0; right: 0;
    bottom: calc(56px + env(safe-area-inset-bottom, 0px));
    z-index: 99998;
    background-color: var(--mbn-bg, #ffffff);
    border-top: 1px solid var(--mbn-border, #e0e0e0);
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 24px rgba(0,0,0,.12);
    max-height: 60vh;
    display: flex; flex-direction: column;
    transform: translateY(100%);
    transition: transform .28s cubic-bezier(.32,.72,0,1);
}

#mbn-drawer.mbn-drawer--open { transform: translateY(0); }

.mbn-drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--mbn-border, #e0e0e0);
    flex-shrink: 0;
}

.mbn-drawer-title {
    font-size: 15px; font-weight: 700;
    color: var(--mbn-text, #1a1a1a);
    letter-spacing: -.01em;
}

.mbn-drawer-close {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border: none; background: #f0f0f0;
    border-radius: 50%; cursor: pointer;
    color: var(--mbn-text, #444); padding: 0;
    flex-shrink: 0; transition: background .15s;
    -webkit-tap-highlight-color: transparent;
}
.mbn-drawer-close:hover,
.mbn-drawer-close:focus { background: #e0e0e0; }
.mbn-drawer-close:focus-visible { outline: 2px solid var(--mbn-text,#444); outline-offset:2px; }
.mbn-drawer-close svg { width:16px; height:16px; display:block; pointer-events:none; }

.mbn-drawer-list {
    list-style: none; margin: 0; padding: 0;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
}

.mbn-drawer-item { border-bottom: 1px solid var(--mbn-border, #f0f0f0); }
.mbn-drawer-item:last-child { border-bottom: none; }

.mbn-drawer-link {
    display: flex; flex-direction: column;
    gap: 3px;
    padding: 10px 16px;
    text-decoration: none; color: inherit;
    transition: background .12s;
    -webkit-tap-highlight-color: transparent;
}
.mbn-drawer-link:hover,
.mbn-drawer-link:focus { background: #f7f7f7; text-decoration: none; color: inherit; }
.mbn-drawer-link:focus-visible { outline: 2px solid var(--mbn-text,#444); outline-offset:-2px; }

/* Wiersz: badge + data */
.mbn-drawer-meta {
    display: flex; align-items: center; gap: 7px;
}

/* Badge witryny */
.mbn-site-badge {
    display: inline-flex; align-items: center;
    font-size: 10px; font-weight: 700; line-height: 1;
    padding: 2px 6px;
    border-radius: 3px;
    background: #2271b1;
    color: #fff;
    white-space: nowrap;
    letter-spacing: .02em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.mbn-drawer-date {
    font-size: 11px; color: #888;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.mbn-drawer-post-title {
    font-size: 13px; font-weight: 500;
    color: var(--mbn-text, #1a1a1a);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mbn-drawer-empty {
    padding: 20px 16px;
    color: #888; font-size: 13px; text-align: center;
    list-style: none;
}
