/* =========================================
   CODEX VIVENDI - MASTER STYLESHEET
   Site-wide branding, layout, and UI overrides.
   ========================================= */


/* ==========================================================================
   1. LAYOUT & CLEANUP
   ========================================================================== */

/* Hides the default "Activity" page title for a cleaner look */
.directory.activity header.entry-header {
    display: none;
}

/* Widget borders: subtle in both modes */
.bb-card, .widget, .element-box {
    border: 1px solid var(--bb-content-border-color);
}


/* ==========================================================================
   2. TYPOGRAPHY ENGINE (The Cathedral Voice)
   ========================================================================== */

/* Force all headings to Cinzel Uppercase */
h1, h2, h3, h4, h5, h6,
.bb-component-title,
.entry-title,
.widget-title,
.site-title {
    font-family: 'Cinzel', serif !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

/* Ensure Site Title specifically is uppercase */
.site-title a {
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
}


/* ==========================================================================
   3. NAVIGATION & MENUS (Glass & Gold Dropdowns)
   ========================================================================== */

.site-header .header-dropdown,
.bb-header-user-dropdown {
    background-color: var(--bb-content-background-color) !important;
    border: 1px solid var(--bb-primary-color) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
}

.bb-header-user-dropdown a {
    color: var(--bb-body-text-color) !important;
}

.bb-header-user-dropdown a:hover {
    color: var(--bb-primary-color) !important;
    background-color: var(--bb-body-background-color) !important;
}

/* Activity filter dropdowns ("Show" and "by" on Activity page) */
.subnav-filters-modal {
    background-color: var(--bb-content-background-color) !important;
    border: 1px solid var(--bb-primary-color) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
}

.subnav-filters-modal a {
    color: var(--bb-body-text-color) !important;
}

.subnav-filters-modal a:hover,
.subnav-filters-modal a.selected {
    color: var(--bb-primary-color) !important;
    background-color: var(--bb-body-background-color) !important;
}

/* Activity "more options" (three-dots) dropdown — frame missing on desktop.
   BuddyBoss only applies border/background inside @media (max-width: 980px). */
.bb-activity-more-options.open {
    background-color: var(--bb-content-background-color) !important;
    border: 1px solid var(--bb-primary-color) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
}


/* ==========================================================================
   4. FORMS & INPUTS
   ========================================================================== */

/* Force Comment Box text to be readable */
.ac-input.medium-editor-element,
.ac-input.medium-editor-element p {
    color: var(--bb-body-text-color) !important;
}

/* Fix the placeholder 'Write a comment...' color */
.ac-input.medium-editor-element:empty::before {
    color: var(--bb-alternate-text-color) !important;
}

/* Force Checkboxes to use Gold instead of Blue */
input[type="checkbox"]:checked {
    accent-color: var(--bb-primary-color) !important;
}


/* ==========================================================================
   5. REGISTRATION PAGE
   ========================================================================== */

/* Site-wide modals (Terms, Privacy, Plain Language Summary) — dark theme */
.registration-popup.bb-modal,
.bb-modal {
    background: var(--bb-content-background-color) !important;
    border: 1px solid var(--bb-primary-color) !important;
    border-radius: 8px !important;
    overflow: hidden;
}

.registration-popup.bb-modal h1,
.registration-popup.bb-modal .bb_modal_heading,
.bb-modal h1,
.bb-modal .bb_modal_heading {
    background: var(--bb-body-background-color) !important;
    color: var(--bb-primary-color) !important;
    font-family: 'Cinzel', serif !important;
    padding: 1.25rem 1.5rem !important;
    margin: 0 !important;
    border-bottom: 1px solid rgba(var(--bb-primary-color-rgb), 0.3) !important;
}

.registration-popup.bb-modal .mfp-close,
.bb-modal .mfp-close {
    color: var(--bb-primary-color) !important;
    opacity: 0.7;
}

.registration-popup.bb-modal .mfp-close:hover,
.bb-modal .mfp-close:hover {
    opacity: 1;
}

.registration-popup.bb-modal h4,
.bb-modal h4 {
    color: var(--bb-primary-color) !important;
    margin: 1.5rem 0 0.5rem 0;
}

.registration-popup.bb-modal p,
.bb-modal p {
    color: var(--bb-body-text-color) !important;
    line-height: 1.7;
}

.registration-popup.bb-modal hr,
.bb-modal hr {
    border-color: rgba(var(--bb-primary-color-rgb), 0.2) !important;
    margin: 1.5rem 0;
}

/* Target the strong tag specifically on the Register Page feedback box */
#register-page .bp-feedback.info p strong {
    display: block;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--bb-content-border-color);
    width: 100%;
    line-height: 1.5;
    font-weight: 400;
}

#register-page .bp-feedback.info p strong::first-line {
    font-weight: 700;
}

/* Tighten spacing above Terms checkbox */
#register-page .checkbox-options {
    margin-top: -10px !important;
}

/* Reduce spacing between checkboxes so they feel like a unit */
#register-page .checkbox-options .bp-checkbox-wrap + .bp-checkbox-wrap {
    margin-top: -20px !important;
}

/* "Want the short version?" link below checkboxes */
#register-page .cv-summary-link {
    margin: -5px 0 0 0;
    padding-left: 30px;
    font-size: 0.9rem;
    color: var(--bb-alternate-text-color);
}

#register-page .cv-summary-link a {
    color: var(--bb-primary-color);
    text-decoration: none;
}

#register-page .cv-summary-link a:hover {
    color: var(--bb-headings-color);
}

/* Mobile: wrapped Terms label text aligns under itself, not under checkbox */
@media screen and (max-width: 768px) {
    #register-page .checkbox-options .bp-checkbox-wrap .option-label {
        display: inline-block !important;
        padding-left: 30px !important;
        position: relative !important;
    }

    #register-page .checkbox-options .bp-checkbox-wrap .option-label::before {
        position: absolute !important;
        left: 0 !important;
        top: 2px !important;
    }

    /* Vertically center checkbox text with the checkbox */
    #register-page .checkbox-options .bp-checkbox-wrap .option-label {
        line-height: 1.5 !important;
    }

    /* Match line-height on summary link text to checkbox label */
    #register-page .cv-summary-link {
        line-height: 1.5 !important;
    }
}


/* ==========================================================================
   6. GIVEWP OVERRIDES
   ========================================================================== */

/* Donation modal: raise above BuddyBoss sticky header (z-index: 612) */
.givewp-donation-form-modal__overlay {
    z-index: 9999 !important;
}

.givewp-donation-form-modal__close {
    z-index: 10000 !important;
}

/* --- Donate Card Widget: no inner frame, gradient gold top line --- */
.cv-donate-card {
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: hidden;
    position: relative;
}

.cv-donate-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--bb-primary-color), transparent);
}

.cv-donate-card__image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--bb-block-radius-inner);
}

.cv-donate-card__content {
    padding: 0.75rem 0 0 0;
}

.cv-donate-card__heading {
    color: var(--bb-primary-color);
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
    text-transform: none !important;
}

.cv-donate-card__body {
    color: var(--bb-alternate-text-color);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

/* Solid gold button (primary CTA, not ghost) */
.cv-donate-card__button .givewp-donation-form-modal__open {
    width: 100%;
    background: var(--bb-primary-color);
    color: var(--bb-body-background-color);
    border: none;
    border-radius: var(--bb-button-radius);
    padding: 0.6rem 1rem;
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.cv-donate-card__button .givewp-donation-form-modal__open:hover {
    background: color-mix(in srgb, var(--bb-primary-color) 85%, black);
    color: var(--bb-body-background-color);
}

/* ==========================================================================
   7. BBPRESS FORUM OVERRIDES
   ========================================================================== */

/* Reply icon arrow: gold instead of invisible grey */
#bbpress-forums .bbp-reply-to-link > i.bb-icon-reply {
    color: var(--bb-primary-color) !important;
}

/* ==========================================================================
   8. BUDDYPANEL MOBILE MENU
   ========================================================================== */

/* Divider line above Log Out in the BuddyPanel */
.buddypanel-menu li.bp-logout-nav {
    border-top: 1px solid var(--bb-content-border-color);
    margin-top: 10px;
    padding-top: 2px;
}


/* ==========================================================================
   9. NOTIFICATION SETTINGS - MOBILE DROPDOWN
   ========================================================================== */

/* Email/Web toggle dropdown on Notification Settings page */
.bb-mobile-setting .bb-mobile-setting-anchor {
    background-color: var(--bb-content-background-color) !important;
    color: var(--bb-primary-color) !important;
    border: 1px solid var(--bb-primary-color) !important;
}

.bb-mobile-setting .bb-mobile-setting-anchor::after {
    color: var(--bb-primary-color) !important;
}

.bb-mobile-setting ul {
    border: 1px solid var(--bb-primary-color) !important;
}

/* Select arrows — make them visible (gold) on dark backgrounds */
.profile-settings select,
.bp-navs__dropdown {
    color: var(--bb-body-text-color) !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23C4A44A' d='M6 8L0 0h12z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 12px 8px !important;
    padding-right: 30px !important;
}


/* ==========================================================================
   10. HEADER SEARCH OVERLAY
   ========================================================================== */

/* Search bar background — BB hardcodes #fff */
.header-search-wrap {
    background: var(--bb-body-background-color) !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.3) !important;
}

/* Search input field */
.header-search-wrap input.search-field,
.header-search-wrap .search-field-top {
    background-color: var(--bb-content-background-color) !important;
    border: 1px solid rgba(var(--bb-primary-color-rgb), 0.4) !important;
    color: var(--bb-headings-color) !important;
}

.header-search-wrap input.search-field::placeholder {
    color: rgba(var(--bb-body-text-color-rgb, 255, 255, 255), 0.5) !important;
}

.header-search-wrap input.search-field:focus,
.header-search-wrap .search-field-top:focus {
    border-color: rgba(var(--bb-primary-color-rgb), 0.8) !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Search icon */
.header-search-wrap .search-form label::before,
.header-search-wrap .search-form i {
    color: var(--bb-primary-color) !important;
}

/* Close button */
.header-search-wrap a.close-search i {
    color: var(--bb-primary-color) !important;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.header-search-wrap a.close-search:hover i {
    opacity: 1;
}

/* Search results autocomplete dropdown */
.bp-search-ac-header,
.bp-search-ac,
.bp-forum-search-ac-header {
    background-color: var(--bb-content-background-color) !important;
    border: 1px solid rgba(var(--bb-primary-color-rgb), 0.15) !important;
}

/* Result items */
.bp-search-ac-header > li,
.bp-search-ac > li {
    border-color: rgba(var(--bb-primary-color-rgb), 0.15) !important;
}

.bp-search-ac-header > li:hover,
.bp-search-ac > li:hover {
    background-color: rgba(var(--bb-primary-color-rgb), 0.08) !important;
}

/* Result text */
.bp-search-ac-header .item-name a,
.bp-search-ac .item-name a {
    color: var(--bb-headings-color) !important;
}

.bp-search-ac-header .item-meta,
.bp-search-ac .item-meta {
    color: var(--bb-alternate-text-color) !important;
}

/* Matched/highlighted search text */
.bp-search-ac-header .item-name a strong,
.bp-search-ac .item-name a strong {
    color: var(--bb-primary-color) !important;
    font-weight: 400;
}


/* ==========================================================================
   11. SHARE DROPDOWN
   ========================================================================== */

/* Dropdown container — identical to .bb-header-user-dropdown (Section 3) */
.buddyboss-share-dropdown {
    background-color: var(--bb-content-background-color) !important;
    border: 1px solid var(--bb-primary-color) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
}

/* Share items — match user dropdown link style */
.buddyboss-share-dropdown .share-dropdown-item,
.buddyboss-share-dropdown .share-dropdown-item span {
    color: var(--bb-body-text-color) !important;
    background: transparent !important;
    border: none !important;
}

/* Icons */
.buddyboss-share-dropdown .share-dropdown-item i {
    color: var(--bb-body-text-color) !important;
}

/* Hover/tap — gold text + darker background, identical to user dropdown */
.buddyboss-share-dropdown .share-dropdown-item:hover,
.buddyboss-share-dropdown .share-dropdown-item:active {
    color: var(--bb-primary-color) !important;
    background-color: var(--bb-body-background-color) !important;
}

.buddyboss-share-dropdown .share-dropdown-item:hover i,
.buddyboss-share-dropdown .share-dropdown-item:active i {
    color: var(--bb-primary-color) !important;
}


/* ==========================================================================
   12. DIRECTORY GRID/LIST VIEW TOGGLE
   ========================================================================== */

/* Active view icon should be clearly visible */
.grid-filters .layout-view.active i {
    color: var(--bb-headings-color) !important;
}


/* ==========================================================================
   13. MORE OPTIONS DROPDOWN (Report/Block)
   ========================================================================== */

/* Gold border on the "Options" popup (three-dots menu on member cards) */
.bb_more_options_list.bb_more_dropdown {
    border: 1px solid var(--bb-primary-color) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
}


/* ==========================================================================
   14. DEFINED TERM TOOLTIPS (matching homepage cv-head.php)
   ========================================================================== */

.defined-term {
    border-bottom: 1px dashed currentColor;
    cursor: help;
    position: relative;
    display: inline;
}

.defined-term:hover .term-tooltip,
.defined-term.active .term-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.term-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    transform: translateY(8px);
    background: #0F172A;
    color: #FAF9F6;
    padding: 0.875rem 1rem;
    border-radius: 0.375rem;
    border: 1px solid #D4AF37;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1.6;
    text-transform: none;
    letter-spacing: normal;
    width: 300px;
    max-width: 90vw;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
    pointer-events: none;
}

.term-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 20px;
    border: 6px solid transparent;
    border-top-color: #D4AF37;
}

.term-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 21px;
    border: 5px solid transparent;
    border-top-color: #0F172A;
    z-index: 1;
}

/* Info icon variant: no dashed underline, gold icon */
.cv-info-icon-wrap {
    border-bottom: none !important;
}

.cv-info-icon {
    color: var(--bb-primary-color);
    font-size: 1.1em;
    cursor: help;
    margin-left: 4px;
    vertical-align: middle;
}

/* Mobile: tooltip as fixed panel so it doesn't overflow narrow screens */
@media screen and (max-width: 768px) {
    .term-tooltip {
        position: fixed !important;
        left: 5vw !important;
        right: 5vw !important;
        bottom: 30% !important;
        top: auto !important;
        transform: none !important;
        width: auto !important;
        max-width: none !important;
    }

    .term-tooltip::after,
    .term-tooltip::before {
        display: none !important;
    }
}


/* ==========================================================================
   15. WELCOME POPUP – Desktop / Mobile content switching
   ========================================================================== */

.cv-welcome-mobile {
    display: none;
}

@media screen and (max-width: 768px) {
    .cv-welcome-desktop {
        display: none !important;
    }
    .cv-welcome-mobile {
        display: block !important;
    }
}


/* --- GiveWP Modal: Dark theme ---
   NOTE: The donation form renders inside an iframe. These styles cannot
   reach it from the parent page. Use GiveWP's Custom CSS field in the
   Form Builder (Design tab) instead. See codex-vivendi-core/third-part/give-modal-dark-theme.css for the
   CSS to paste there. */
