/* =============================================================
   DAC Training — Global Footer
   ============================================================= */

.dac-footer {
    background: var(--dac-navy);
    color: var(--dac-white);
    font-family: var(--dac-font);
}

/* ── Main content area ──────────────────────────────────────── */

.dac-footer__main {
    max-width: 1200px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 60px 24px 40px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 0 28px;
}

/* [dac_enroller_info] renders an empty string for guests and any broker without
   enroller data assigned — most visitors. The Bricks column div still renders
   around it, so without this the grid keeps a fully blank column/row. On desktop
   that's one quiet gap among five; stacked to a single column on mobile it shows
   up as a doubled-height blank gap between Weekly Schedule and Need Help. Hiding
   the empty div lets grid auto-placement close the gap on every breakpoint. */
.dac-footer__col:empty {
    display: none;
}

/* ── Column headings ────────────────────────────────────────── */

.dac-footer__col-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--dac-white);
    margin: 0 0 14px;
}

/* ── Link lists (Quick Links, Accounts) ─────────────────────── */

.dac-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dac-footer__links li {
    margin-bottom: 8px;
}

.dac-footer__links a {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.5;
    transition: color 0.15s ease;
}

.dac-footer__links a:hover,
.dac-footer__links a:focus {
    color: var(--dac-white);
}

/* ── Right section header ("Have Questions Or Need Help?") ──── */

.dac-footer__section-header {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dac-white);
    margin: 0 0 20px;
    line-height: 1.35;
}

/* ── Enroller / Support contact block ───────────────────────── */

.dac-footer-contact__label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.55);
    margin: 0 0 10px;
}

.dac-footer-contact__name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dac-white);
    margin: 0 0 6px;
}

.dac-footer-contact__item {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.82);
    margin: 0 0 5px;
    line-height: 1.5;
}

.dac-footer-contact__item a {
    color: rgba(255, 255, 255, 0.82);
    text-decoration: none;
    transition: color 0.15s ease;
}

.dac-footer-contact__item a:hover,
.dac-footer-contact__item a:focus {
    color: var(--dac-white);
}

.dac-footer-contact__hours {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.82rem;
}

/* ── Need Help? column (col 4) ──────────────────────────────── */

.dac-footer__sup-hours {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.50);
    margin: 0 0 16px;
    line-height: 1.4;
}

.dac-footer__sup-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dac-footer__sup-btn,
.dac-footer__sup-btn.brxe-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    padding: 10px 16px !important;
    border-radius: 7px !important;
    text-decoration: none !important;
    text-align: center !important;
    width: 100% !important;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease !important;
    box-shadow: none !important;
    letter-spacing: 0 !important;
}

.dac-footer__sup-btn--primary,
.dac-footer__sup-btn--primary.brxe-button {
    background: var(--dac-green) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 3px 10px rgba(60, 182, 66, 0.28) !important;
}

.dac-footer__sup-btn--primary:hover,
.dac-footer__sup-btn--primary.brxe-button:hover {
    background: var(--dac-green-hover) !important;
    color: #fff !important;
}

.dac-footer__sup-btn--ghost,
.dac-footer__sup-btn--ghost.brxe-button {
    background: rgba(255, 255, 255, 0.07) !important;
    color: rgba(255, 255, 255, 0.78) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
}

.dac-footer__sup-btn--ghost:hover,
.dac-footer__sup-btn--ghost.brxe-button:hover {
    background: rgba(255, 255, 255, 0.13) !important;
    border-color: rgba(255, 255, 255, 0.26) !important;
    color: #fff !important;
}

/* ── Divider ────────────────────────────────────────────────── */

.dac-footer__divider {
    max-width: 1200px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 0 24px;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* ── Bottom bar ─────────────────────────────────────────────── */

.dac-footer__bottom {
    background: rgba(0, 0, 0, 0.18);
    width: 100%;
    box-sizing: border-box;
}

.dac-footer__bottom-inner {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 18px 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 0 24px;
}

.dac-footer__legal {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

/* wp_nav_menu wraps items in <ul> — make it transparent to the flex layout */
.dac-footer__legal .dac-footer__menu-list {
    display: contents;
    list-style: none;
    margin: 0;
    padding: 0;
}

.dac-footer__legal .dac-footer__menu-list li {
    margin: 0;
}

.dac-footer__legal a {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: color 0.15s ease;
}

.dac-footer__legal a:hover,
.dac-footer__legal a:focus {
    color: var(--dac-white);
}

.dac-footer__copyright {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
    text-align: center;
}

.dac-footer__address {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: right;
}

/* ── Weekly Schedule column ─────────────────────────────────── */

.dac-footer__schedule {
    display: flex;
    flex-direction: column;
}

.dac-footer__sched-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.dac-footer__sched-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.dac-footer__sched-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--dac-green);
    flex-shrink: 0;
    margin-top: 5px;
    box-shadow: 0 0 0 3px rgba(60, 182, 66, 0.18);
}

.dac-footer__sched-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dac-footer__sched-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dac-white);
    line-height: 1.3;
}

.dac-footer__sched-meta {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.4;
}

.dac-footer__sched-join {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 14px;
    background: var(--dac-green);
    color: #fff !important;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 7px;
    text-decoration: none !important;
    transition: background 0.15s ease;
    box-shadow: 0 3px 10px rgba(60, 182, 66, 0.28);
    width: 100%;
}

.dac-footer__sched-join:hover,
.dac-footer__sched-join:focus {
    background: var(--dac-green-hover);
    color: #fff !important;
}

/* ── Responsive — 2 columns at tablet ─────────────────────────
   Matches the site-standard breakpoint (build_page_in_bricks.md: Tablet
   768-1024). 5 grid tracks defined but the enroller column is usually
   :empty (see rule above), so in practice this is 4 items -> 2 clean rows
   of 2 instead of the old 3-column split that left an orphaned pair. */

@media (max-width: 1024px) {
    .dac-footer__main {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 36px;
    }
}

/* ── Responsive — 1 column on mobile ───────────────────────────
   Matches the site-standard Mobile breakpoint (<768, not the old <480-only
   cutoff). The bottom bar also switches to a stacked column here: at
   768-480px the legal links + copyright + address were still forced into
   one nowrap flex row and got visibly cramped/overlapping. */

@media (max-width: 768px) {
    .dac-footer__main {
        grid-template-columns: 1fr;
        row-gap: 46px;
        padding: 44px 24px 32px;
    }

    /* Flow the nav-link menus into 2 columns on mobile so the tall Quick Links
       list (6 links) collapses from 6 rows to 3 and Accounts from 2 to 1 —
       cuts a big chunk of the footer's vertical length. Weekly Schedule and the
       Need Help buttons stay full-width (below) so tap targets aren't shrunk. */
    .dac-footer__links {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 20px;
        row-gap: 10px;
    }

    .dac-footer__links li {
        margin-bottom: 0;
    }

    /* Bump the section headers 25% on mobile (0.7rem -> 0.875rem). */
    .dac-footer__col-label {
        font-size: 0.875rem;
    }

    /* Weekly Schedule on mobile: collapse each call from a stacked 2-line block
       into a single aligned row — [green dot] [call name] [days · time] — so the
       dots, names, and times line up in columns down the list and the section
       reads shorter. */
    .dac-footer__sched-row {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 4px 10px;
    }

    .dac-footer__sched-dot {
        margin-top: 0;
    }

    .dac-footer__sched-info {
        display: contents;
    }

    .dac-footer__sched-meta {
        text-align: right;
        white-space: nowrap;
    }

    .dac-footer__bottom-inner {
        flex-direction: column;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 12px;
    }

    .dac-footer__copyright,
    .dac-footer__address {
        text-align: left;
    }
}

/* ── Responsive — small mobile tightening ──────────────────── */

@media (max-width: 480px) {
    .dac-footer__main {
        row-gap: 40px;
        padding: 40px 24px 32px;
    }

    .dac-footer__bottom-inner {
        gap: 6px;
    }
}

/* ── Dashboard mobile: clear Tutor's fixed bottom tab bar (2026-07-06) ────────
   The sitewide footer is now also emitted on the Tutor 4.0 dashboard route
   (see dac-custom/includes/footer.php, dac_render_dashboard_footer). On mobile
   the dashboard shows a fixed bottom tab bar (.tutor-dashboard-nav-mobile,
   ~73px) that overlaps the footer's bottom bar (copyright + address). Add
   clearance below the footer ONLY on the dashboard route (body class
   tutor-screen-frontend-dashboard) so normal-page footers are unaffected. */
@media (max-width: 768px) {
    body.tutor-screen-frontend-dashboard #brx-footer {
        padding-bottom: 90px;
    }
}
