﻿.course-detail__asideCard {
    border: 1px solid #e5e5e5;
    border-radius: 14px;
    overflow: hidden;
    position: sticky;
    top: 16px;
    background: #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    padding: 0;
}

.course-detail__asideHeader {
    background: #a8a8a8;
    color: #fff;
    padding: 18px 20px;
    font-weight: 700;
}

.course-detail__asideBody {
    padding: 18px 20px 20px 20px;
    border-bottom: 1px solid #efefef;
}

.course-detail__price {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 12px 0;
}

.course-detail__schedulePicker {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0 14px 0;
    cursor: pointer;
    user-select: none;
}

.course-detail__scheduleCheck {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    background: #0a8a2a;
    position: relative;
    flex: 0 0 auto;
}

    .course-detail__scheduleCheck::after {
        content: "";
        position: absolute;
        left: 5px;
        top: 2px;
        width: 6px;
        height: 10px;
        border-right: 2px solid #fff;
        border-bottom: 2px solid #fff;
        transform: rotate(45deg);
    }

.course-detail__schedulePickerText {
    font-weight: 600;
    line-height: 1.2;
}

.course-detail__scheduleChevron {
    margin-left: auto;
    width: 18px;
    height: 18px;
    position: relative;
    flex: 0 0 auto;
}

    .course-detail__scheduleChevron::before {
        content: "";
        position: absolute;
        inset: 0;
        margin: auto;
        width: 8px;
        height: 8px;
        border-right: 2px solid #333;
        border-bottom: 2px solid #333;
        transform: rotate(-135deg);
        transition: transform 240ms ease;
    }

/* Chevron rotation when collapsed */
.course-detail__scheduleItem.is-collapsed .course-detail__scheduleChevron::before {
    transform: rotate(45deg);
}

.course-detail__kv {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 10px 14px;
    margin: 6px 0 16px 0;
    /* animation */
    overflow: hidden;
    max-height: 3000px;
    opacity: 1;
    transform: translateY(0);
    transition: max-height 240ms ease, opacity 200ms ease, transform 240ms ease, margin 240ms ease;
}

/* Collapse animation (per schedule item) */
.course-detail__scheduleItem.is-collapsed .course-detail__kv {
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
    margin: 0;
}

.course-detail__scheduleItem.is-collapsed .course-detail__enroll {
    display: none;
}

.course-detail__kvKey {
    color: #333;
    opacity: 0.75;
}

.course-detail__kvKey--top {
    align-self: start;
    padding-top: 2px;
}

.course-detail__daysList {
    display: grid;
    gap: 14px;
}

.course-detail__dayGroup {
    display: grid;
    gap: 6px;
}

.course-detail__dayDate {
    font-weight: 600;
}

.course-detail__dayTime {
    color: #333;
    opacity: 0.9;
}

.course-detail__enroll {
    width: 100%;
    height: 44px;
    border-radius: 9999px;
    border: 0;
    background: #2f2f2f;
    color: #fff;
    font-weight: 700;
    cursor: not-allowed;
    opacity: 0.7;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}

    .course-detail__enroll:disabled {
        cursor: not-allowed;
    }

.course-detail {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 20px;
}

.course-detail__back {
    display: inline-block;
    margin: 16px 0;
    text-decoration: none;
}

.course-detail__title {
    margin: 0 0 12px 0;
}

.course-detail__banner {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    margin: 12px 0 0 0;
}

.course-detail__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
    margin-top: 20px;
}

@media (max-width: 980px) {
    .course-detail__grid {
        grid-template-columns: 1fr;
    }
}

.course-detail__block + .course-detail__block {
    margin-top: 22px;
}

.course-detail__block h2,
.course-detail__block h3 {
    margin: 0 0 10px 0;
}

.course-detail__scheduleTitle {
    margin: 18px 0 10px 0;
}

/* Legacy list styles (safe to keep even if not used by the new markup) */
.course-detail__days {
    list-style: none;
    padding: 0;
    margin: 0;
}

.course-detail__day {
    border-top: 1px solid #eee;
    padding: 10px 0;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .course-detail__kv,
    .course-detail__scheduleChevron::before {
        transition: none;
    }
}

.course-detail__waitList {
    margin-top: 20px;
    text-align: center;
    font-weight: normal;
    color: #333;
    cursor: pointer;
    background-color: inherit;
    border-color: transparent;
}