/**
 * Fearless Living Custom Styles
 * Version: 2.0.0
 */

/* ==========================================================================
   LearnDash Breadcrumbs Customization
   ========================================================================== */

/* Breadcrumb link colors */
.fli-ld-breadcrumbs a,
.ld-breadcrumbs a,
.learndash-breadcrumbs a {
    color: var(--bb-primary-button-background-regular, var(--fli-brand-yellow)) !important;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.fli-ld-breadcrumbs a:hover,
.ld-breadcrumbs a:hover,
.learndash-breadcrumbs a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Breadcrumb title formatting with Frank Ruhl font weights */
.breadcrumb-title-heavy {
    font-family: 'Frank Ruhl Libre', 'Frank Ruhl', serif;
    font-weight: 800;
    color: inherit;
}

.breadcrumb-title-light {
    font-family: 'Frank Ruhl Libre', 'Frank Ruhl', serif;
    font-weight: 400;
    color: inherit;
}

/* Apply to all breadcrumb containers */
.fli-ld-breadcrumbs,
.ld-breadcrumbs,
.learndash-breadcrumbs {
    font-family: 'Frank Ruhl Libre', 'Frank Ruhl', serif;
    margin-bottom: 20px;
    padding: 10px 0;
    font-size: 14px;
    line-height: 1.6;
}

/* Breadcrumb separator styling */
.ld-breadcrumbs-separator {
    margin: 0 8px;
    color: var(--bb-alternate-text-color, var(--fli-brand-gray-medium));
    font-weight: 400;
}

/* Current page (non-linked) styling */
.fli-ld-breadcrumbs .current,
.ld-breadcrumbs .current,
.learndash-breadcrumbs .current {
    color: var(--bb-alternate-text-color, var(--fli-brand-gray-medium));
    font-weight: 400;
}

/* Ensure proper spacing for formatted titles in breadcrumbs */
.fli-ld-breadcrumbs span.breadcrumb-title-heavy + span.breadcrumb-title-light,
.ld-breadcrumbs span.breadcrumb-title-heavy + span.breadcrumb-title-light {
    margin-left: 0.25em;
}

/* Override default LearnDash breadcrumb styles if needed */
.learndash-wrapper .ld-breadcrumbs {
    background: transparent;
    border: none;
    padding-left: 0;
    padding-right: 0;
}

/* ==========================================================================
   End LearnDash Breadcrumbs
   ========================================================================== */

/* ==========================================================================
   Content Width Adjustments
   ========================================================================== */

/* Make main content area wider on LearnDash pages */
.single-sfwd-courses .bb-grid,
.single-sfwd-lessons .bb-grid,
.single-sfwd-topic .bb-grid,
.single-sfwd-quiz .bb-grid,
.post-type-archive-sfwd-courses .bb-grid {
    max-width: 100% !important;
}

/* Adjust content column to take more space */
.single-sfwd-courses .content-area,
.single-sfwd-lessons .content-area,
.single-sfwd-topic .content-area,
.single-sfwd-quiz .content-area,
.post-type-archive-sfwd-courses .content-area {
    max-width: 100% !important;
    flex: 1 1 100% !important;
}

/* If there's a sidebar, adjust the grid */
.single-sfwd-courses .site-content-grid,
.single-sfwd-lessons .site-content-grid,
.single-sfwd-topic .site-content-grid,
.single-sfwd-quiz .site-content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

/* With sidebar layout */
.sidebar-left .site-content-grid,
.sidebar-right .site-content-grid {
    grid-template-columns: 1fr !important;
}

/* Wider container for LearnDash content */
.learndash-wrapper {
    max-width: 100% !important;
    padding-right: 20px !important;
}

/* Adjust the main content container */
.single-sfwd-courses .site-content,
.single-sfwd-lessons .site-content,
.single-sfwd-topic .site-content,
.single-sfwd-quiz .site-content {
    max-width: 1400px !important;
    margin: 0 auto;
    padding: 0 30px;
}

/* Full width for the actual lesson content */
.learndash-wrapper .ld-course-content,
.learndash-wrapper .ld-lesson-content,
.learndash-wrapper .ld-topic-content {
    max-width: 100% !important;
}

/* BuddyBoss specific container adjustments */
.bb-learndash-content-wrap {
    max-width: 100% !important;
}

/* Adjust if LearnDash Focus Mode is active */
.learndash-focus .learndash-wrapper,
.learndash-focus-main .learndash-wrapper {
    max-width: 100% !important;
    padding: 0 40px !important;
}

/* For focus mode sidebar layout */
.learndash-focus-main {
    max-width: calc(100% - 300px) !important;
}

/* Desktop specific adjustments */
@media (min-width: 1025px) {
    .single-sfwd-courses .container,
    .single-sfwd-lessons .container,
    .single-sfwd-topic .container,
    .single-sfwd-quiz .container {
        max-width: 1400px !important;
        padding-left: 30px;
        padding-right: 30px;
    }
    
    /* Remove right margin/padding that might be causing the gap */
    .single-sfwd-courses .entry-content,
    .single-sfwd-lessons .entry-content,
    .single-sfwd-topic .entry-content,
    .single-sfwd-quiz .entry-content {
        margin-right: 0 !important;
        padding-right: 0 !important;
    }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1024px) {
    .learndash-wrapper {
        padding-right: 15px !important;
    }
}

/* Mobile adjustments */
@media (max-width: 767px) {
    .learndash-wrapper {
        padding-right: 10px !important;
    }
    
    .single-sfwd-courses .site-content,
    .single-sfwd-lessons .site-content,
    .single-sfwd-topic .site-content,
    .single-sfwd-quiz .site-content {
        padding: 0 15px;
    }
}

/* ==========================================================================
   End Content Width Adjustments
   ========================================================================== */

/* ==========================================================================
   BuddyBoss Color Overrides - Replace Coral Orange with Proper Colors
   ========================================================================== */

/* Override the coral orange color in bb-highlight class with BuddyBoss primary color */
.bb-highlight {
    background: -webkit-linear-gradient(270deg, rgba(255, 255, 255, 0) 50%, var(--bb-primary-button-background-regular, #E6ED5A) 50%) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 50%, var(--bb-primary-button-background-regular, #E6ED5A) 50%) !important;
}

.bb-highlight.bb-highlight--red {
    background: -webkit-linear-gradient(270deg, rgba(255, 255, 255, 0) 50%, var(--bb-primary-button-background-regular, #E6ED5A) 50%) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 50%, var(--bb-primary-button-background-regular, #E6ED5A) 50%) !important;
}

/* Override any buttons that might be using the coral orange color */
button[style*="#fe6f4b"],
.button[style*="#fe6f4b"],
.btn[style*="#fe6f4b"] {
    background-color: var(--bb-primary-button-background-regular, #E6ED5A) !important;
    border-color: var(--bb-primary-button-border-regular, #E6ED5A) !important;
    color: var(--bb-primary-button-text-regular, #1B181C) !important;
}

button[style*="#fe6f4b"]:hover,
.button[style*="#fe6f4b"]:hover,
.btn[style*="#fe6f4b"]:hover {
    background-color: var(--bb-primary-button-background-hover, #BFC046) !important;
    border-color: var(--bb-primary-button-border-hover, #BFC046) !important;
    color: var(--bb-primary-button-text-hover, #1B181C) !important;
}

/* Override accessibility menu colors if they're using coral orange */
.screen-reader-text:focus,
.screen-reader-text:active,
.skip-link,
.skip-link:focus,
.skip-link:active {
    background-color: var(--bb-primary-button-background-regular, #E6ED5A) !important;
    color: var(--bb-primary-button-text-regular, #1B181C) !important;
}

/* Override any other elements that might be using the coral orange color */
*[style*="#fe6f4b"] {
    background-color: var(--bb-primary-button-background-regular, #E6ED5A) !important;
    color: var(--bb-primary-button-text-regular, #1B181C) !important;
}

/* Additional overrides for common button and accessibility elements */
.button-primary,
.wp-block-button__link,
.wp-element-button,
input[type="submit"],
input[type="button"],
button[type="submit"],
button[type="button"] {
    background-color: var(--bb-primary-button-background-regular, #E6ED5A) !important;
    border-color: var(--bb-primary-button-border-regular, #E6ED5A) !important;
    color: var(--bb-primary-button-text-regular, #1B181C) !important;
}

.button-primary:hover,
.wp-block-button__link:hover,
.wp-element-button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
button[type="submit"]:hover,
button[type="button"]:hover {
    background-color: var(--bb-primary-button-background-hover, #BFC046) !important;
    border-color: var(--bb-primary-button-border-hover, #BFC046) !important;
    color: var(--bb-primary-button-text-hover, #1B181C) !important;
}

/* Override any elements with coral orange background or color */
[style*="background-color: #fe6f4b"],
[style*="background: #fe6f4b"],
[style*="color: #fe6f4b"],
[style*="border-color: #fe6f4b"] {
    background-color: var(--bb-primary-button-background-regular, #E6ED5A) !important;
    color: var(--bb-primary-button-text-regular, #1B181C) !important;
    border-color: var(--bb-primary-button-border-regular, #E6ED5A) !important;
}

/* ==========================================================================
   End BuddyBoss Color Overrides
   ========================================================================== */