/* Sidebar Component Styles */
/* Course sidebar navigation - Figma: Somatic Energy Platform Nav (figma-sidebar-node.json) */

/* Figma tokens */
:root {
    --sidebar-width: 278px;
    --sidebar-bg: #f4f4f4;
    --sidebar-border: #cecece;
    --sidebar-text: #434343;
    --sidebar-text-active: #000000;
    --sidebar-header: #a2a2a2;
    --sidebar-active-bg: #e0e0e0;
    --sidebar-divider: #cfcfcf;
    --sidebar-font: SF Pro Display, -apple-system, BlinkMacSystemFont, sans-serif;
    /* Support / Account / Log Out icons — same gold as assets/images/icon_color.svg */
    --sidebar-bottom-icon: #A7925B;
}

/* Course Sidebar - Figma: 278px, #f4f4f4, 0.65px #cecece right */
.course-sidebar {
    width: var(--sidebar-width);

    background-color: var(--sidebar-bg);
    padding: 0;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow: hidden;
    z-index: 100;
    border-right: 0.65px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
}

.course-sidebar-header {
    padding: 24px 20px 0 20px;
    border-bottom: none;
    background-color: var(--sidebar-bg);
    cursor: pointer;
    margin-bottom: 36px;
    flex-shrink: 0;
}

.course-logo {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 6px;
}

.course-logo img {
    height: 29px;
    width: auto;
    flex-shrink: 0;
}

.course-title {
    font-family: var(--sidebar-font);
    font-size: 15px;
    font-weight: 500;
    color: var(--sidebar-text);
    margin: 0;
    letter-spacing: 0;
    line-height: 100%;
    vertical-align: middle;
    white-space: nowrap;
}

/* Navigation - Welcome/Resources/Live Webinars fixed, lessons scrollable */
.course-navigation {
    padding: 0;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.course-nav-list {
    list-style: none;
    margin: 0;
    padding: 0 0 0 0;
    flex-shrink: 0;
}

/* Figma: nav items at x=20, 25px vertical spacing (Welcome y=96, Resources y=121) */
.course-sidebar .nav-link {
    padding: 6px 12px 6px 20px;
}

.sections-header {
    flex-shrink: 0;
}

/* Lessons block - single scroll container for both lesson groups */
.course-nav-lessons-scroll {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    margin-top: 4px;
}

.course-nav-sections {
    flex: none;
}

.nav-item {
    border-bottom: none;
}

/* Live Webinars uses same structure as Lessons (sections-header + sections-list) */

/* Link styles are in components/links.css */

/* Coming Soon Badge */
.coming-soon-badge {
    background-color: #9CA3AF;
    color: white;
    font-family: SF Pro Display, sans-serif;
    font-size: 9px;
    font-weight: 600;
    line-height: 100%;
    letter-spacing: -4%;
    vertical-align: middle;
    padding: 4px 8px;
    border-radius: 12px;
    text-transform: none;
    margin-left: 8px;
}

/* Sections - LIVE WEBINARS, SECTIONS - Figma: 10px, 700, #a2a2a2, x=20 */
.sections-header {
    padding: 12px 20px 0 20px;
}

/* Live Webinars items - Figma: Recordings y=176, Schedule y=195, x=20 */
.course-sidebar .nav-sub-list .section-link {
    padding: 4px 12px 4px 20px;
}

.sections-header h3 {
    font-family: var(--sidebar-font);
    color: var(--sidebar-header);
    font-size: 10px;
    font-weight: 700;
    font-style: normal;
    line-height: 100%;
    letter-spacing: 0;
    vertical-align: middle;
    padding-bottom: 10px;
    margin: 0;
    text-transform: uppercase;
}

/* Collapsible section groups (Human Energy System, Energy Practitioner Skills & Technique) - Figma node 2-1014 */
.section-group {
    margin: 0;
    padding: 0;
}

/* Human Energy System row - Figma: arrow at x=21 (2×3px), text at x=27, 4px gap */
.section-group summary.section-group-header {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 20px;
    margin: 0;
    font-family: var(--sidebar-font);
}

.section-group summary.section-group-header::-webkit-details-marker,
.section-group summary.section-group-header::marker {
    display: none;
}

/* Arrow - Figma Vector: down when expanded, right when collapsed */
.section-group .section-caret {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.section-group .section-caret img {
    display: block;
}

.section-group:not([open]) .section-caret-down {
    display: none !important;
}

.section-group[open] .section-caret-right {
    display: none !important;
}

/* Human Energy System - 13px, 500 default, 700 when expanded */
.section-group-header h3 {
    font-family: var(--sidebar-font);
    font-weight: 500;
    font-style: normal;
    font-size: 13px;
    line-height: 100%;
    letter-spacing: 0;
    vertical-align: middle;
    text-transform: none;
    padding: 0;
    margin: 0;
    color: var(--sidebar-text);
}

.section-group[open] .section-group-header h3 {
    font-weight: 700;
}

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

/* Lesson list - Figma: indented from Human Energy System, active bg x=6 */
.course-nav-sections .sections-list {
    margin-left: 28px;
    padding-left: 0;
}

.section-item {
    border-bottom: none;
    margin: 0;
    padding: 0;
}

.course-nav-sections .section-item.active {
    overflow: visible;
}

/* Lesson links - Figma: 12px, 500 */
.course-nav-sections .section-item .section-link {
    font-family: var(--sidebar-font);
    font-size: 12px;
    font-weight: 500;
    font-style: normal;
    line-height: 100%;
    letter-spacing: 0;
    vertical-align: middle;
    padding: 5px 12px 5px 0px;
    margin: 0 6px;
    border-radius: 10px 0 0 10px;
}

.course-nav-sections .section-item .section-link:hover
{
    margin-left:-22px;
    padding-left:22px;
    width: calc(100% + 22px);
}

/* Active lesson - Figma Rectangle 2: bg full to right edge */
.course-nav-sections .section-item.active .section-link {
    font-weight: 600;
    background-color: #d7d7d7;
    color: #000;
    margin-left: -16px;
    margin-right: 0;
    padding-left: 26px;
    padding-right: 6px;
    width: calc(100% + 22px);
    box-sizing: border-box;
}

.section-item.active {
    background-color: transparent;
    border-bottom: none;
    padding: 0;
    margin: 0;
}

/* Section link styles are in components/links.css */

/* Topics List - nested under lessons */
.topics-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: #f9fafb;
}

.topic-item {
    border-bottom: 1px solid #e5e7eb;
}

/* Topic link styles are in components/links.css */

/* Topic sublist - ordered list, number via counter (checkmark before number) */
.section-sub-list {
    counter-reset: topic;
    list-style: none;
    margin: 4px 0 12px 7px;
    padding-left: 0;
    padding-right: 60px;
}

.section-sub-item {
    counter-increment: topic;
    margin-bottom: 4px;
}

.section-sub-link .topic-num::before {
    content: counter(topic) ". ";
    font-size: 12px;
    font-weight: 400;
}

.section-sub-item {
    margin-bottom: 4px;
}

.section-sub-link .topic-num {
    flex-shrink: 0;
}

/* Topic links - Figma: 12px, 400, #434343 */
.section-sub-link {
    font-family: var(--sidebar-font);
    font-size: 12px;
    font-weight: 400;
    line-height: 100%;
    letter-spacing: 0;
    color: var(--sidebar-text);
    text-decoration: none;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 2px 0;
}
.section-sub-link .section-sub-link-text {
    text-decoration: none;
}

.section-sub-link:hover .section-sub-link-text {
    text-decoration: underline;
}

/* Topic spacer (incomplete) - align width with checkmark for consistent text alignment */
.section-sub-item:not(.topic-completed) .section-sub-link .topic-spacer {
    display: inline-block;
    width: 16px;
    min-width: 16px;
    flex-shrink: 0;
}

/* Active topic styling */
.section-sub-item.active .section-sub-link {
    font-weight: 600;
    color: var(--sidebar-text-active);
}
.section-sub-item.active .section-sub-link .section-sub-link-text {
    text-decoration: underline;
}

/* Completed topic: checkmark as list marker (light orange/gold per reference) */
.section-sub-item.topic-completed .topic-completed-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    background-color: var(--color-topic-completed, #A7925B);
    color: white;
    border-radius: 50%;
    font-size: 10px;
    font-weight: bold;
    line-height: 1;
    top:-2px;
    position: relative;
}

/* Bottom Links Section - Figma: 0.55px #cfcfcf dividers */
.sidebar-bottom-links {
    border-top: 0.55px solid var(--sidebar-divider);
    margin-top: 0;
    flex-shrink: 0;
    background-color: var(--sidebar-bg);
}

.sidebar-bottom-links .sidebar-bottom-link {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 20px;
    border-bottom: 0.55px solid var(--sidebar-divider);
    text-decoration: none;
    color: var(--sidebar-text);
    font-family: var(--sidebar-font);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 0;
}

.sidebar-bottom-links .sidebar-bottom-link:last-child {
    border-bottom: none;
}

.sidebar-bottom-links .sidebar-bottom-link:hover {
    background-color: var(--sidebar-active-bg);
    color: var(--sidebar-text-active);
    box-shadow: 0 0 20px rgba(207, 207, 207, 0.6);
    transform: translateX(4px);
    border-radius: 0;
}

.sidebar-bottom-links .sidebar-bottom-link img {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    vertical-align: middle;
    margin: 0;
}

/* Desktop only: Support / Account / Log Out (Figma: 14px Medium, cap-height trim) */
@media (min-width: 990px) {
    .course-sidebar .sidebar-bottom-links .sidebar-bottom-link {
        font-family: SF Pro Display, -apple-system, BlinkMacSystemFont, sans-serif;
        font-weight: 500;
        font-style: normal;
        font-size: 14px;
        line-height: 100%;
        letter-spacing: 0;
        vertical-align: middle;
        text-box-trim: trim-both;
        text-box-edge: cap alphabetic;
        padding-top:7px;
        padding-bottom:7px;
    }
}

/* Mobile styles - hide sidebar, use hamburger menu instead */
@media (max-width: 989.98px) {
    .course-sidebar {
        display: none;
    }
}
