/* ------------------------------------------------------------
   WRAPT Sponsorship - phone layout (shared by every sponsor-facing page)

   - A fixed bottom navigation bar on phones (built by site-nav.js).
     The top header shrinks to one slim row; the header link buttons are only
     hidden once the bottom bar exists, so there is always a way to navigate.
   - Larger tap targets and tidier buttons on small screens.
   - Fixes the "white text on pale button" problem on the active
     My Sponsorships link.
   - Styles the "Staff area" button that site-nav.js adds to every footer.
   ------------------------------------------------------------ */

/* The active strong (coral) link must stay coral with white text. */
.nav-link-strong.active {
    background: #d84340;
    border-color: #d84340;
    color: #fff;
}

/* "Staff area" button at the bottom of the footer. */
.footer-staff { margin-top: 12px; text-align: center; }
.footer-staff-link {
    display: inline-block;
    padding: 7px 16px;
    border: 1px solid #e8cfa3;
    border-radius: 8px;
    background: #fff;
    color: #7b4a00 !important;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: 0.2s ease;
}
.footer-staff-link:hover { background: #fff4dd; }

.bottom-nav { display: none; }

@media print {
    .bottom-nav { display: none !important; }
    .footer-staff { display: none !important; }
}

@media (max-width: 720px) {

    /* ----- Bottom navigation bar ----- */
    html.has-bottom-nav body {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }

    html.has-bottom-nav .site-nav,
    html.has-bottom-nav .header-nav,
    html.has-bottom-nav .header-links {
        display: none !important;
    }

    .bottom-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 900;
        background: #ffffff;
        border-top: 1px solid #e6e6e6;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .bottom-nav a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-height: 62px;
        padding: 8px 4px 6px;
        font-size: 0.72rem;
        font-weight: 600;
        line-height: 1.1;
        text-align: center;
        color: #7b4a00;
        text-decoration: none;
        border-top: 3px solid transparent;
        -webkit-tap-highlight-color: transparent;
    }

    .bottom-nav a svg {
        width: 24px;
        height: 24px;
        stroke: currentColor;
        fill: none;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .bottom-nav a:active { background: #fff4dd; }
    .bottom-nav a.active { color: #EF5350; border-top-color: #EF5350; }

    /* ----- Slim one-row top header ----- */
    .main-header,
    .site-header {
        flex-wrap: nowrap;
        justify-content: flex-start;
        text-align: left;
        gap: 10px;
        padding: 8px 14px;
    }

    .main-header .logo,
    .brand .logo,
    .site-brand img {
        height: 34px;
    }

    .brand .title,
    .site-brand .site-title,
    .main-header .title {
        font-size: 1.05rem;
        text-align: left;
        flex: 1;
        min-width: 0;
    }

    /* ----- Tap targets and buttons ----- */
    .btn { min-height: 44px; }
    .btn-small { min-height: 40px; }
    .footer-staff-link { min-height: 40px; line-height: 26px; }
    select, input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=search] {
        min-height: 44px;
        font-size: 1rem;
    }

    /* Portal cards: the right-hand button column becomes full-width stacked buttons. */
    .grid-2 > div[style*="text-align:right"] {
        text-align: left !important;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .grid-2 > div[style*="text-align:right"] .btn {
        width: 100%;
        text-align: center;
    }

    .card { padding: 16px; }
    .page { padding: 16px 14px 6px; }
    h1 { font-size: 1.45rem; }

    .site-footer,
    .wrapt-footer {
        margin-top: 28px;
        padding: 16px 12px 24px;
    }
}
