/* BFU Legal 1.0.2. Brand Guide v3 palette: Royal Navy #1B2A4A | Aged Gold #D4A843 | Cream #FFF9ED | Navy Hover #2C4A7C. Georgia headlines, Arial body. */

/* ── Legal pages ── */
/* The document prints its own title, so hide the theme's page title on legal pages. */
body.page:has(.bfu-legal) .entry-header { display: none; }
.bfu-legal {
    max-width: 820px;
    margin: 0 auto;
    padding: 24px 16px 64px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: #333;
}
.bfu-legal h1,
.bfu-legal h2,
.bfu-legal h3 {
    font-family: Georgia, 'Times New Roman', serif;
    color: #1B2A4A;
    line-height: 1.25;
}
.bfu-legal h1 { font-size: 34px; margin: 0 0 6px; }
.bfu-legal h2 { font-size: 22px; margin: 36px 0 10px; padding-top: 18px; border-top: 1px solid rgba(212, 168, 67, .45); }
.bfu-legal h3 { font-size: 18px; margin: 22px 0 8px; }
.bfu-legal__updated { margin: 0 0 24px; color: #6b6b6b; font-size: 14px; }
.bfu-legal__summary {
    margin: 0 0 28px;
    padding: 18px 20px;
    border-radius: 14px;
    background: #FFF9ED;
    border: 1px solid rgba(212, 168, 67, .55);
}
.bfu-legal__summary p:first-child { margin-top: 0; }
.bfu-legal__summary ul { margin-bottom: 0; }
.bfu-legal__caps { text-transform: uppercase; font-size: 14px; letter-spacing: .01em; }
.bfu-legal a { color: #2C4A7C; text-decoration: underline; }
.bfu-legal ul { padding-left: 22px; }
.bfu-legal li { margin: 6px 0; }
.bfu-legal table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: 15px; }
.bfu-legal th, .bfu-legal td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid #e7e2d6; }
.bfu-legal th { background: #1B2A4A; color: #fff; font-weight: 700; }

/* ── Notices above the member tools ── */
.bfu-legal-notice {
    max-width: 1100px;
    margin: 0 auto 16px;
    padding: 12px 16px;
    border-left: 4px solid #D4A843;
    border-radius: 10px;
    background: #FFF9ED;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}
.bfu-legal-notice p { margin: 0; }
.bfu-legal-notice strong { color: #1B2A4A; }
.bfu-legal-notice a { color: #2C4A7C; }

/* ── Legal links row (bottom of every page) ── */
.bfu-legal-links {
    clear: both;
    padding: 18px 16px 22px;
    background: #1B2A4A;
    color: rgba(255, 255, 255, .7);
    font: 13px/1.5 Arial, Helvetica, sans-serif;
    text-align: center;
}
.bfu-legal-links ul { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.bfu-legal-links a { color: #D4A843; text-decoration: none; }
.bfu-legal-links a:hover { text-decoration: underline; }
.bfu-legal-links p { margin: 0; font-size: 12px; }
/* The homepage footer already has a link list; the script moves these links into it. */
.bfu-legal-links--merged { display: none; }
@media (max-width: 720px) { .bfu-legal-links { padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px)); } }

/* ── Cookie notice ── */
.bfu-cookie[hidden], .bfu-cookie-modal[hidden] { display: none !important; }
.bfu-cookie {
    /* !important: the theme sets position on direct children of <body>. */
    position: fixed !important;
    left: 16px !important;
    right: 16px !important;
    bottom: 16px !important;
    top: auto !important;
    margin: 0 !important;
    z-index: 999990 !important;
    font-family: Arial, Helvetica, sans-serif;
}
.bfu-cookie__bar {
    max-width: 1100px;
    margin: 0 auto;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-radius: 14px;
    background: #1B2A4A;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.bfu-cookie__text { margin: 0; flex: 1; font-size: 14px; line-height: 1.5; }
.bfu-cookie__text a { color: #D4A843; text-decoration: underline; }
.bfu-cookie__actions { display: flex; gap: 10px; flex-shrink: 0; }
.bfu-cookie__btn {
    appearance: none;
    border: 2px solid #D4A843;
    border-radius: 999px;
    padding: 9px 20px;
    background: #D4A843;
    color: #1B2A4A;
    font: 700 14px/1 Arial, Helvetica, sans-serif;
    cursor: pointer;
}
.bfu-cookie__btn:hover { background: #e3bd62; border-color: #e3bd62; }
.bfu-cookie__btn--ghost { background: transparent; color: #D4A843; }
.bfu-cookie__btn--ghost:hover { background: rgba(212, 168, 67, .15); color: #f0d48e; }
.bfu-cookie__btn:focus-visible, .bfu-cookie-modal__close:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* Settings dialog */
.bfu-cookie-modal {
    position: fixed !important;
    inset: 0 !important;
    margin: 0 !important;
    z-index: 999995 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 22, 40, .6);
    font-family: Arial, Helvetica, sans-serif;
}
.bfu-cookie-modal__box {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 32px);
    overflow: auto;
    padding: 26px 24px 20px;
    border-radius: 18px;
    background: #fff;
    color: #333;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
}
.bfu-cookie-modal__box h2 { margin: 0 0 8px; font: 700 24px/1.2 Georgia, 'Times New Roman', serif; color: #1B2A4A; }
.bfu-cookie-modal__box > p { margin: 0 0 14px; font-size: 14px; line-height: 1.5; }
.bfu-cookie-modal__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid #eee6d4;
    cursor: pointer;
}
.bfu-cookie-modal__row strong { display: block; color: #1B2A4A; font-size: 15px; }
.bfu-cookie-modal__row span { display: block; font-size: 13px; line-height: 1.45; color: #555; }
.bfu-cookie-modal__row input { width: 20px; height: 20px; margin-top: 2px; flex-shrink: 0; accent-color: #1B2A4A; }
.bfu-cookie-modal__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.bfu-cookie-modal__actions .bfu-cookie__btn--ghost { color: #1B2A4A; border-color: #1B2A4A; }
.bfu-cookie-modal__actions .bfu-cookie__btn--ghost:hover { background: #f4f1e8; color: #1B2A4A; }
.bfu-cookie-modal__small { margin: 14px 0 0; font-size: 12px; color: #6b6b6b; }
.bfu-cookie-modal__small a { color: #2C4A7C; }
.bfu-cookie-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    color: #1B2A4A;
    cursor: pointer;
}

/* Phones: stack the text over the buttons, and sit above the BuddyBoss / Member Nav tab bar. */
@media (max-width: 720px) {
    .bfu-cookie { left: 10px !important; right: 10px !important; bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important; }
    .bfu-cookie__bar { flex-direction: column; align-items: stretch; gap: 12px; padding: 14px; }
    .bfu-cookie__actions { justify-content: stretch; }
    .bfu-cookie__actions .bfu-cookie__btn { flex: 1; }
}

/* The mobile app's in-app tool screens have no site chrome; keep the notice out of them. */
body.bfu-app-view .bfu-legal-links,
body.bfu-app-view .bfu-cookie,
body.bfu-app-view .bfu-cookie-modal { display: none !important; }
