/*
Theme Name: BuddyBoss Child
Description: Child theme for BuddyBoss Theme — migrated from Enfold for True Charity Joplin.
Version: 1.9
Author: True Charity Joplin
Template: buddyboss-theme
Text Domain: buddyboss-child
*/

/* -----------------------------------------------------------------------
 * 1. Hide duplicate page title (theme auto-generates entry-title,
 *    but page content already contains its own heading).
 * --------------------------------------------------------------------- */
.page .entry-header {
    display: none;
}

/* -----------------------------------------------------------------------
 * 2. Header text color (#001240) and linked text color (#002A87)
 * --------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6,
.site-title,
.entry-title {
    color: #001240;
}

a,
.entry-content a,
.widget a,
.comment-content a,
.site-content a {
    color: #002A87;
}

a:hover,
.entry-content a:hover,
.widget a:hover,
.site-content a:hover {
    color: #001240;
}

/* -----------------------------------------------------------------------
 * 3. Video Library slider arrow fix —
 *    prevent overlap and correct arrow order.
 * --------------------------------------------------------------------- */
.aiovg-slick-fixed-arrows {
    display: flex !important;
    justify-content: flex-end;
    gap: 0.5em;
}

.aiovg-slick-fixed-arrows .aiovg-slick-prev,
.aiovg-slick-fixed-arrows .aiovg-slick-next {
    position: relative !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    flex-shrink: 0;
}

/* -----------------------------------------------------------------------
 * 4. Header layout — logo on top, menu below, search on the right.
 * --------------------------------------------------------------------- */

/* Allow the header container to grow to fit two rows */
.site-header .site-header-container.default-header {
    height: auto !important;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    padding-bottom: 10px;
}

/* Logo — left-aligned, shares row with header buttons */
.site-header-container.default-header #site-logo {
    flex: 1 1 auto !important;
    width: auto !important;
    text-align: left;
    padding: 10px 0 5px;
}

/* Navigation — full width row below logo, all items visible */
.site-header-container.default-header .header-navigation {
    flex: 1 1 100%;
    justify-content: center;
    max-width: none !important;
    overflow: visible !important;
}

.site-header-container.default-header .header-navigation #primary-menu {
    justify-content: center;
    flex-wrap: wrap;
    overflow: visible !important;
    max-width: none !important;
}

/* Force all menu items visible, hide the "More" overflow button */
.site-header-container.default-header .header-navigation #primary-menu > li.menu-item {
    visibility: visible !important;
    opacity: 1 !important;
    display: list-item !important;
    position: relative !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
}

.site-header-container.default-header .header-navigation #primary-menu > li.more-button,
.site-header-container.default-header .header-navigation .bb-more-menu-item {
    display: none !important;
}

/* Hide user profile dropdown and separator from header */
#header-aside .user-wrap {
    display: none !important;
}

#header-aside .bb-separator {
    display: none !important;
}

/* Search/aside — right side of nav row */
.site-header-container.default-header #header-aside {
    flex: 0 0 auto;
}

/* Push content below the now-taller sticky header */
.sticky-header .site-content,
body.buddypress.sticky-header .site-content,
.bb-buddypanel.sticky-header .site-content {
    padding-top: 180px !important;
}

/* -----------------------------------------------------------------------
 * 5. Widen header, body, and footer to match — 1400px
 * --------------------------------------------------------------------- */

/* Global container — applies to header + body content */
.container {
    max-width: 1400px !important;
}

/* Content area */
.site-content > .container,
.bb-grid > .container {
    max-width: 1400px !important;
}

/* Custom footer — match the same width */
#tc-custom-footer .tc-footer-inner {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 10px;
    padding-right: 10px;
}

/* -----------------------------------------------------------------------
 * 6. Dashboard buttons — max-width 300px
 * --------------------------------------------------------------------- */
.entry-content a[href="/resource-partner-benefits/"],
.entry-content a[href="/ambassador-hub/"] {
    max-width: 300px !important;
    margin-left: auto;
    margin-right: auto;
}

/* -----------------------------------------------------------------------
 * 7. Subscribe to calendar — max-width 300px + #1B2A4A background
 * --------------------------------------------------------------------- */
.tribe-events-c-subscribe-dropdown .tribe-common-c-btn-border {
    
    background-color: #1B2A4A !important;
    color: #fff !important;
    font-weight: 600;
    font-size: 13px;
    line-height: 20px;
    border-radius: 100px !important;
    border-color: #1B2A4A !important;
}

.tribe-events-c-subscribe-dropdown .tribe-events-c-subscribe-dropdown__button-text {
    color: #fff !important;
}

.tribe-events-c-subscribe-dropdown .tribe-common-c-svgicon--caret-down .tribe-common-c-svgicon__svg-fill {
    fill: #fff !important;
}

/* -----------------------------------------------------------------------
 * 8. Upcoming events — slightly more compact
 * --------------------------------------------------------------------- */
.tribe-events-pro-photo__event {
    font-size: 0.9em;
}


.tribe-common--breakpoint-medium.tribe-events .tribe-events-l-container {
    padding: 10px 0 !important;
}

.tribe-events .tribe-events-c-events-bar,
.tribe-events .tribe-events-header {
    margin-bottom: 8px;
}

.tribe-events-pro-photo .tribe-common-g-row {
    gap: 12px;
}

.tribe-events .tribe-events-c-top-bar {
    padding: 6px 0;
}

/* List view compact */
.tribe-events .tribe-events-calendar-list__event {
    padding: 10px 0;
}

.tribe-events .tribe-events-calendar-list__event-row--primary {
    gap: 12px;
}

/* -----------------------------------------------------------------------
 * 9. Events view selector dropdown — 110px wide
 * --------------------------------------------------------------------- */
#tribe-events-view-selector-content > ul {
    width: 110px;
}

/* -----------------------------------------------------------------------

/* -----------------------------------------------------------------------

/* Footer bottom row — narrower width */
#tc-custom-footer > div.tc-footer-bottom > div {
    max-width: 1220px;
}

/* -----------------------------------------------------------------------
 * 11. Global button background color — #1B2A4A
 * --------------------------------------------------------------------- */
button,
input[type="submit"],
input[type="button"],
.button,
.btn,
a.button,
a.btn,
.wp-block-button__link,
.tribe-common-c-btn,
.tribe-common-c-btn-border,
.tribe-events-c-subscribe-dropdown .tribe-common-c-btn-border,
.gform_wrapper .gform_button,
.gform_wrapper input[type="submit"],
.mepr-submit,
.bbp-submit-wrapper button,
#buddypress input[type="submit"],
.entry-content .wp-block-button__link,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
    background-color: #1B2A4A !important;
    color: #fff !important;
    font-weight: 600;
    font-size: 13px;
    line-height: 20px;
    border-radius: 100px !important;
    color: #fff !important;
    border-color: #1B2A4A !important;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.button:hover,
.btn:hover,
a.button:hover,
a.btn:hover,
.wp-block-button__link:hover,
.tribe-common-c-btn:hover,
.tribe-common-c-btn-border:hover,
.gform_wrapper .gform_button:hover,
.gform_wrapper input[type="submit"]:hover,
.mepr-submit:hover,
#buddypress input[type="submit"]:hover,
.entry-content .wp-block-button__link:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
    background-color: #001240 !important;
    color: #fff !important;
    border-color: #001240 !important;
}

/* -----------------------------------------------------------------------
 * 12. Block buttons — match dashboard style, spaced out
 * --------------------------------------------------------------------- */
.wp-block-buttons {
    display: flex;
    flex-direction: row;
    gap: 4px;
    align-items: stretch;
}

.wp-block-buttons .wp-block-button__link {
    display: block;
    flex: 1 1 0;
    
    text-align: center;
    padding: 15px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
}

/* -----------------------------------------------------------------------
 * 13. Events UI buttons — remove dark background
 * --------------------------------------------------------------------- */
.tribe-events-c-top-bar__datepicker button,
.tribe-events-c-events-bar > button,
.tribe-events-c-view-selector button,
.tribe-events-c-nav__list-item--next button,
.tribe-events-c-nav__list-item--prev a,
.tribe-events-c-nav__list-item--today a {
    background-color: transparent !important;
    color: inherit !important;
    border-color: transparent !important;
}

/* -----------------------------------------------------------------------
 * 14. Active menu underline — match button color #1B2A4A
 * --------------------------------------------------------------------- */
#primary-menu > li.current-menu-item > a,
#primary-menu > li.current-menu-ancestor > a,
#primary-menu > li.current_page_item > a {
    border-bottom-color: #1B2A4A !important;
}

.wp-block-buttons .wp-block-button__link:last-child {
    margin-bottom: 20px;
}

/* -----------------------------------------------------------------------
 * 15. WP Admin bar — #1B2A4A background
 * --------------------------------------------------------------------- */
#wpadminbar {
    background-color: #1B2A4A !important;
    color: #fff !important;
    font-weight: 600;
    font-size: 13px;
    line-height: 20px;
    border-radius: 100px !important;
}

#wpadminbar .ab-top-menu > li > .ab-item,
#wpadminbar .ab-top-menu > li > .ab-item:focus,
#wpadminbar .ab-top-menu > li:hover > .ab-item {
    background-color: #1B2A4A !important;
    color: #fff !important;
    font-weight: 600;
    font-size: 13px;
    line-height: 20px;
    border-radius: 100px !important;
}

#wpadminbar .ab-top-menu > li:hover > .ab-item {
    background-color: #001240 !important;
}

/* -----------------------------------------------------------------------
 * 17. Global left/right content padding
 * --------------------------------------------------------------------- */
#content > div {
    padding-left: 70px !important;
    padding-right: 70px !important;
}

/* -----------------------------------------------------------------------
 * 16. (Removed — replaced by Section 22)
 * --------------------------------------------------------------------- */

/* -----------------------------------------------------------------------
 * 18. Primary menu links — reduce padding
 * --------------------------------------------------------------------- */
#primary-menu > li > a {
    padding-left: 8px !important;
    padding-right: 8px !important;
}

#primary-menu > li.menu-item-has-children > a {
    padding-right: 22px !important;
}

/* -----------------------------------------------------------------------
 * 19. Recent Posts Cards — sidebar widget
 * --------------------------------------------------------------------- */
.tc-recent-posts-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tc-post-card {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    background: #fff;
    text-decoration: none;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.tc-post-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.16);
    transform: translateY(-2px);
    text-decoration: none;
}

.tc-post-card__img {
    width: 100%;
    height: 140px;
    background-size: cover;
    background-position: center;
}

.tc-post-card__body {
    padding: 12px 14px;
}

.tc-post-card__date {
    display: block;
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tc-post-card__title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1B2A4A;
    line-height: 1.4;
}

.tc-post-card:hover .tc-post-card__title {
    color: #001240;
}

/* -----------------------------------------------------------------------
 * 20. Podcast embed above blog posts
 * --------------------------------------------------------------------- */
.tc-podcast-above-posts {
    margin-bottom: 40px;
}

.tc-podcast-above-posts iframe {
    border-radius: 8px;
    overflow: hidden;
    display: block;
    border: 1px solid #e0e0e0;
}

.tc-podcast-above-posts h3 {
    margin-bottom: 12px;
    color: #1B2A4A;
}

/* -----------------------------------------------------------------------
 * 21. Two-row header: logo + buttons on top, nav below
 * --------------------------------------------------------------------- */
.site-header-container.default-header {
    flex-wrap: wrap !important;
}

.site-header-container.default-header #site-navigation {
    order: 10 !important;
    width: 100% !important;
    flex: 0 0 100% !important;
}

.site-header-container.default-header #site-logo {
    flex: 1 1 auto !important;
}

.site-header-container.default-header #header-aside {
    flex: 0 0 auto !important;
    order: 2 !important;
    display: flex !important;
    align-items: center !important;
}

.site-header-container.default-header #header-aside .header-aside-inner {
    display: flex !important;
    align-items: center !important;
}

/* -----------------------------------------------------------------------
 * 22. Dashboard + My Account header buttons
 * --------------------------------------------------------------------- */
.tc-header-btn.button.small {
    background-color: #1B2A4A !important;
    color: #fff !important;
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 20px;
    border-radius: 100px !important;
    border-color: #1B2A4A !important;
    padding: 8px 20px !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-left: 8px;
    white-space: nowrap;
}

.tc-header-btn.button.small:hover {
    background-color: #001240 !important;
    color: #fff !important;
    border-color: #001240 !important;
}

/* -----------------------------------------------------------------------
 * 23. Search icon in nav row — positioned on the far right
 * --------------------------------------------------------------------- */
#primary-navbar {
    position: relative !important;
}

#tc-nav-search {
    position: absolute !important;
    right: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

#tc-nav-search .header-search-link {
    color: inherit;
    font-size: 18px;
    display: flex;
    align-items: center;
    text-decoration: none;
}

/* First menu item — remove left padding */
#primary-menu #menu-item-166 {
    padding-left: 0 !important;
}

/* -----------------------------------------------------------------------
 * 24. Custom directory filter bar (Service Programs, Demographics, etc.)
 * --------------------------------------------------------------------- */
#tc-custom-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px 0 5px;
    margin-bottom: 5px;
}

.tc-filter-group {
    flex: 1 1 220px;
    min-width: 180px;
}

.tc-filter-group--actions {
    flex: 0 0 auto;
    min-width: auto;
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin-left: auto;
}

.tc-filter-input,
.tc-filter-select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    color: #333;
    height: 40px;
    box-sizing: border-box;
}

.tc-filter-input:focus,
.tc-filter-select:focus {
    border-color: #1B2A4A;
    outline: none;
    box-shadow: 0 0 0 1px #1B2A4A;
}

.tc-filter-input::placeholder {
    color: #999;
}

.tc-search-btn {
    background-color: #1B2A4A;
    border: 1px solid #1B2A4A;
    border-radius: 4px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 20px;
    cursor: pointer;
    white-space: nowrap;
    height: 40px;
    box-sizing: border-box;
    transition: all 0.15s ease;
}

.tc-search-btn:hover {
    background-color: #001240;
    border-color: #001240;
}

.tc-clear-btn {
    background: none;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #666;
    font-size: 13px;
    padding: 8px 16px;
    cursor: pointer;
    white-space: nowrap;
    height: 40px;
    box-sizing: border-box;
    transition: all 0.15s ease;
}

.tc-clear-btn:hover {
    border-color: #1B2A4A;
    color: #1B2A4A;
    background: #f5f5f5;
}

/* Hide borders on directory filter tabs and layout buttons */
#post-4645 .mpdir-view-tabs,
#post-4645 .mpdir-layout-buttons,
#post-4647 .mpdir-layout-buttons,
#post-4649 .mpdir-layout-buttons {
    border: none !important;
}

/* Search + Clear Filters buttons — equal width with spacing */
.tc-filter-group--actions {
    gap: 12px;
}

.tc-search-btn,
.tc-clear-btn {
    min-width: 120px;
    text-align: center;
}

/* -----------------------------------------------------------------------
 * 25. Directory filter loading overlay + spinner
 * --------------------------------------------------------------------- */
#tc-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 10;
    font-size: 14px;
    color: #555;
    border-radius: 6px;
}

.tc-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid #ddd;
    border-top-color: #1B2A4A;
    border-radius: 50%;
    animation: tc-spin 0.6s linear infinite;
}

@keyframes tc-spin {
    to { transform: rotate(360deg); }
}

/* -----------------------------------------------------------------------
 * 26. MemberPress Courses — match site branding (#1B2A4A)
 * --------------------------------------------------------------------- */

/* "In Progress" badge on course cards & course overview */
.mpcs-button .is-purple,
.mpcs-button.is-purple,
.mpcs-lesson-locked-buttons a.mpcs-button.is-purple {
    background-color: #1B2A4A !important;
    color: #fff !important;
    font-weight: 600;
    font-size: 13px;
    line-height: 20px;
    border-radius: 100px !important;
    border-color: #1B2A4A !important;
    color: #fff !important;
}

/* "Start" badge on course cards & course overview */
.mpcs-button .is-green,
.mpcs-button.is-green {
    background-color: #1B2A4A !important;
    color: #fff !important;
    font-weight: 600;
    font-size: 13px;
    line-height: 20px;
    border-radius: 100px !important;
    border-color: #1B2A4A !important;
    color: #fff !important;
}

/* "Completed" badge — subtle brand styling */
.mpcs-button .is-gray,
.mpcs-button.is-gray {
    background-color: #6b7a8d !important;
    border-color: #6b7a8d !important;
    color: #fff !important;
}

/* Progress bar track — brand-tinted instead of default grey (#555) */
.course-progress-bar-main {
    background: #d0d5dd !important;
}

/* Progress bar fill — brand blue instead of default green */
.course-progress-bar-main > span {
    background-color: #1B2A4A !important;
    color: #fff !important;
    font-weight: 600;
    font-size: 13px;
    line-height: 20px;
    border-radius: 100px !important;
    background-image: none !important;
}

/* Complete Lesson / Next Lesson / Previous Lesson — style as buttons.
   Non-classroom layout uses #mpcs-lesson-navigation with plain <a> tags. */
div#mpcs-lesson-navigation a,
.mpcs-clearfix#mpcs-lesson-navigation a {
    display: inline-block !important;
    background-color: #1B2A4A !important;
    color: #fff !important;
    font-weight: 600;
    font-size: 13px;
    line-height: 20px;
    border-radius: 100px !important;
    color: #fff !important;
    padding: 10px 24px !important;
    border-radius: 100px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    text-align: center !important;
    transition: background-color 0.2s ease;
    cursor: pointer !important;
    border: none !important;
    line-height: 1.5 !important;
    margin: 5px 4px !important;
}

div#mpcs-lesson-navigation a:hover,
div#mpcs-lesson-navigation a:focus,
.mpcs-clearfix#mpcs-lesson-navigation a:hover,
.mpcs-clearfix#mpcs-lesson-navigation a:focus {
    background-color: #001240 !important;
    color: #fff !important;
    text-decoration: none !important;
}

/* Lesson list Start / View buttons next to each lesson */
.mpcs-lesson-button .mpcs-button.is-outline {
    background-color: transparent !important;
    border: 2px solid #1B2A4A !important;
    color: #1B2A4A !important;
}

/* Classroom mode buttons (if enabled in future) */
section#mpcs-lesson-navigation a,
#mpcs-navbar #mpcs-lesson-navigation a,
#mpcs-sidebar-navbar #mpcs-lesson-navigation a,
#mpcs-navbar #mpcs-lesson-navigation button,
#mpcs-sidebar-navbar #mpcs-lesson-navigation button {
    background: #1B2A4A !important;
    border-color: #1B2A4A !important;
    color: #fff !important;
}

section#mpcs-lesson-navigation a:hover,
#mpcs-navbar #mpcs-lesson-navigation a:hover,
#mpcs-navbar #mpcs-lesson-navigation button:hover,
#mpcs-sidebar-navbar #mpcs-lesson-navigation a:hover,
#mpcs-sidebar-navbar #mpcs-lesson-navigation button:hover {
    background: #001240 !important;
    border-color: #001240 !important;
}

/* Account page course progress bar */
.course-progress {
    border-radius: 100px !important;
    overflow: hidden;
}
.course-progress .user-progress {
    min-width: 32px !important;
    background-color: #1B2A4A !important;
    color: #fff !important;
    font-weight: 600;
    font-size: 13px;
    line-height: 20px;
    border-radius: 100px !important;
}

/* -----------------------------------------------------------------------
 * 27. Mobile slide-out panel — My Dashboard + My Account buttons
 * --------------------------------------------------------------------- */
.tc-mobile-header-btns {
    display: flex;
    gap: 10px;
    padding: 12px 20px;
    border-bottom: 1px solid #e8e8e8;
}

.tc-mobile-header-btns .tc-mobile-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #1B2A4A !important;
    color: #fff !important;
    font-weight: 600;
    font-size: 0.8125rem;
    line-height: 1.4;
    padding: 8px 12px;
    border-radius: 100px;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
}

.tc-mobile-header-btns .tc-mobile-btn:hover,
.tc-mobile-header-btns .tc-mobile-btn:focus {
    background-color: #001240 !important;
    color: #fff !important;
}

/* -----------------------------------------------------------------------
 * 28. MemberPress login form fixes
 * --------------------------------------------------------------------- */

/* Password visibility toggle — remove blue button background */
.mp_wrapper.mp_login_form .mepr_password .button.mp-hide-pw,
.mepr-form .button.mp-hide-pw {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Log In button — center text vertically and horizontally */
.mp_wrapper.mp_login_form #wp-submit {
    text-align: center !important;
    padding: 14px 20px !important;
    line-height: 1 !important;
    vertical-align: middle !important;
    box-sizing: border-box !important;
    height: auto !important;
}

/* Hide spacer on login page */
#post-17 > div > div > div.mp-spacer {
    display: none !important;
}

/* Forgot Password link — move below Log In button on mobile */
@media (max-width: 768px) {
    .mp_wrapper.mp_login_form .mepr-login-actions {
        position: static !important;
        text-align: center;
        margin-top: 12px;
    }
}
