/*
 * Thin custom layer on top of vendored Bootstrap — theme colors and
 * the mobile-app chrome (top bar, bottom tab bar, network indicator)
 * that Bootstrap doesn't provide out of the box. Keep app-specific
 * component styling here; prefer Bootstrap utility classes in
 * templates over new custom classes where possible.
 */

:root {
    --chmf-primary: #0b5d4f;
    --chmf-primary-dark: #08453a;
    --chmf-online: #1e8e3e;
    --chmf-offline: #b3261e;

    --bs-primary: var(--chmf-primary);
    --bs-primary-rgb: 11, 93, 79;
}

body {
    background: #f4f6f8;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

body.pb-nav {
    padding-bottom: calc(3.75rem + env(safe-area-inset-bottom, 0));
}

.network-status {
    background: #5b6672;
    color: #fff;
}

.network-status.is-online {
    background: var(--chmf-online);
}

.network-status.is-offline {
    background: var(--chmf-offline);
}

.app-navbar {
    background: var(--chmf-primary);
    padding-top: env(safe-area-inset-top, 0);
}

.app-main {
    max-width: 34rem;
    margin: 0 auto;
}

/* Mobile-app-style bottom tab bar */
.app-tab-bar {
    padding-bottom: env(safe-area-inset-bottom, 0);
    z-index: 1030;
}

.app-tab-bar .d-flex {
    max-width: 34rem;
    margin: 0 auto;
}

.app-tab-bar__item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    padding: 0.5rem 0.25rem;
    font-size: 0.72rem;
    color: #495057;
    text-decoration: none;
}

.app-tab-bar__item.active {
    color: var(--chmf-primary);
    font-weight: 600;
}

.app-tab-bar__item--disabled {
    color: #adb5bd;
}

.app-tab-bar__icon {
    font-size: 1.25rem;
    line-height: 1;
}

.install-help-dialog[open] {
    border: none;
    border-radius: 0.75rem;
    padding: 1.25rem;
    max-width: 24rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2);
}

.install-help-dialog p {
    display: none;
}

.vcard-visual {
    background: linear-gradient(135deg, var(--chmf-primary), var(--chmf-primary-dark));
    border-radius: 1rem;
}

.offline-banner {
    background: #fff3cd;
    color: #664d03;
    border: 1px solid #ffe69c;
    border-radius: 0.5rem;
    padding: 0.6rem 0.9rem;
    margin-bottom: 1rem;
}
