/* ============================================================
   base.css — resets + app chrome (header / brand / page body / footer)
   Split out of the old single site.css in Phase 2.
   ============================================================ */

html {
    font-size: 16px;
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
    background: var(--c-bg);
    color: var(--c-text);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Brand / Title (used in the top bar) */
.app-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--c-brand-1), var(--c-brand-2));
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.28);
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-title {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: var(--c-text-strong);
}

.brand-subtitle {
    margin-top: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--c-text-muted);
}

/* Page body */
.page-container {
    margin-top: 24px;
    margin-bottom: 40px;
}

.app-main-card {
    background: var(--c-surface);
    border-radius: 18px;
    padding: 28px;
    min-height: 420px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

/* Footer */
.app-footer {
    background: var(--c-surface);
    padding: 14px 0;
}

.navbar-nav .nav-link {
    font-weight: 600;
}

/* ---- Mobile ---- */
@media (max-width: 768px) {
    .brand-title {
        font-size: 1.15rem;
    }

    .brand-subtitle {
        display: none; /* slim top bar on phones */
    }

    .brand-icon {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .app-main-card {
        padding: 18px;
        border-radius: 14px;
    }

    .page-container {
        margin-top: 16px;
    }

    /* Clear the fixed bottom tab bar + the iOS home indicator. */
    body {
        margin-bottom: 0;
        padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 8px);
    }

    /* FamilyChat is full-screen with no tab bar — no bottom clearance needed. */
    body.lr-chat-page {
        padding-bottom: 0;
    }

    .app-footer {
        display: none; /* footer is desktop-only; mobile uses the tab bar */
    }
}
