/* Reserve space at bottom of mobile viewports so content isn't hidden behind tab bar */
@media (max-width: 900px) {
    body {
        padding-bottom: calc(68px + env(safe-area-inset-bottom)) !important;
    }
}

/* Fixed Bottom Tab Bar */
.cl-bottom-nav {
    display: none;
}

@media (max-width: 900px) {
    .cl-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 99990;
        display: flex;
        justify-content: space-around;
        align-items: center;
        background: #ffffff;
        border-top: 1px solid #e5e7eb;
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
        -webkit-tap-highlight-color: transparent;
    }
}

.cl-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    color: #52525b;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 2px;
    transition: color 0.15s ease, transform 0.1s ease;
}

.cl-nav-item:active {
    transform: scale(0.94);
}

.cl-nav-icon {
    width: 22px;
    height: 22px;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cl-nav-icon svg {
    width: 21px;
    height: 21px;
}

.cl-nav-item.is-active,
.cl-nav-item:hover {
    color: #B95732;
    font-weight: 600;
}

/* Smart Install Banner (Sits neatly above the bottom nav) */
.cl-install-banner {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(74px + env(safe-area-inset-bottom));
    z-index: 99995;
    background: #27272a;
    color: #ffffff;
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.22);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.cl-install-banner[hidden] {
    display: none !important;
}

.cl-install-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cl-install-text {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    line-height: 1.35;
}

.cl-install-text strong {
    font-size: 14px;
    color: #ffffff;
}

.cl-install-text span {
    color: #d4d4d8;
    font-size: 12px;
}

.cl-install-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.cl-btn-primary {
    background: #B95732;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.cl-btn-close {
    background: transparent;
    border: none;
    color: #a1a1aa;
    font-size: 22px;
    line-height: 1;
    padding: 2px 6px;
    cursor: pointer;
}

/* =========================================================
   APP-ONLY POLISH (Triggers ONLY when launched from Home Screen)
   ========================================================= */
@media all and (display-mode: standalone) {
    /* Hide web-only footer clutter & install banner inside the installed app */
    footer,
    .site-footer,
    #colophon,
    .cl-install-banner {
        display: none !important;
    }

    /* Smooth native-like scrolling */
    html {
        overscroll-behavior-y: contain;
    }
}