@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;700&display=swap');

.heroplayer-layout {
    --hero-accent: #d34f3f;
    --hero-accent-soft: #fbe4de;
    --hero-accent-line: #f2c8c0;
    --hero-text: #2b2b2b;
    --hero-muted: #8b7c78;
    --hero-panel: #fef6f4;
    --hero-shadow: 0 16px 32px rgba(0, 0, 0, 0.16);

    font-family: 'Manrope', 'Helvetica Neue', sans-serif;
    color: var(--hero-text);
    background:
        radial-gradient(circle at 20% 20%, rgba(251, 228, 222, 0.6), transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #fbf7f5 100%);
    padding: 0;
    border-radius: 0;
}

.format-heroplayer #page {
    padding-left: 0;
    padding-right: 0;
}

.format-heroplayer #page.drawers div[role='main'] {
    padding-left: 0;
    padding-right: 0;
}

.format-heroplayer {
    --hero-accent: #d34f3f;
    --hero-accent-soft: #fbe4de;
    --hero-accent-line: #f2c8c0;
    --hero-text: #2b2b2b;
    --hero-muted: #8b7c78;
    --hero-panel: #fef6f4;
    --hero-shadow: 0 16px 32px rgba(0, 0, 0, 0.16);
    --heroplayer-sidebar-width: 320px;
    --heroplayer-top-offset: 64px;
}

.format-heroplayer #page {
    margin-left: var(--heroplayer-sidebar-width) !important;
    padding-left: 0;
    padding-right: 0;
}

.format-heroplayer .drawer {
    background: transparent;
}

.format-heroplayer #theme_boost-drawers-courseindex {
    width: var(--heroplayer-sidebar-width) !important;
    max-width: var(--heroplayer-sidebar-width) !important;
    min-width: var(--heroplayer-sidebar-width) !important;
    background: #ffffff;
    border-right: 1px solid var(--hero-accent-line);
    box-shadow: 0 12px 28px rgba(211, 79, 63, 0.12);
    top: var(--heroplayer-top-offset) !important;
    height: calc(100vh - var(--heroplayer-top-offset)) !important;
}

.format-heroplayer #theme_boost-drawers-courseindex .drawercontent {
    padding: 16px 14px 24px !important;
}

.format-heroplayer #courseindex {
    font-family: 'Manrope', 'Helvetica Neue', sans-serif;
    background: transparent;
}

.format-heroplayer #courseindex .courseindex-section {
    border: 1px solid #e6e6e6;
    border-radius: 16px;
    background: #f7f7f7;
    margin-bottom: 14px;
    overflow: hidden;
}

.format-heroplayer #courseindex .courseindex-section.heroplayer-section-complete {
    border-color: var(--hero-accent-line);
    background: #fde8e2;
}

.format-heroplayer #courseindex .courseindex-section-title {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--hero-muted);
    font-weight: 700;
    font-size: 15px;
    background: #f7f7f7;
}

.format-heroplayer #courseindex .courseindex-section.heroplayer-section-complete .courseindex-section-title {
    color: #b23e32;
    background: #fde8e2;
}

.format-heroplayer #courseindex .courseindex-section-title .courseindex-chevron {
    margin-right: 4px;
}

.format-heroplayer #courseindex .courseindex-section-title a {
    color: inherit;
    text-decoration: none;
}

.format-heroplayer #courseindex li.courseindex-item[data-for='cm'] {
    border-top: 1px solid #f3d7cf;
    background: #ffffff;
}

.format-heroplayer #courseindex li.courseindex-item[data-for='cm'] .courseindex-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 16px;
    color: var(--hero-muted);
    text-decoration: none;
    font-size: 14px;
}

.format-heroplayer #courseindex a.courseindex-link {
    --heroplayer-index-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M14%202H7a2%202%200%200%200-2%202v16a2%202%200%200%200%202%202h10a2%202%200%200%200%202-2V8z'%2F%3E%3Cpath%20d%3D'M14%202v6h6'%2F%3E%3C%2Fsvg%3E");
}

.format-heroplayer #courseindex a.courseindex-link[href*='/mod/videotime/'] {
    --heroplayer-index-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'black'%3E%3Cpath%20d%3D'M8%205v14l11-7z'%2F%3E%3C%2Fsvg%3E");
}

.format-heroplayer #courseindex a.courseindex-link[href*='/mod/quiz/'],
.format-heroplayer #courseindex a.courseindex-link[href*='/mod/feedback/'] {
    --heroplayer-index-icon: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2024%2024'%20fill%3D'none'%20stroke%3D'black'%20stroke-width%3D'2'%20stroke-linecap%3D'round'%20stroke-linejoin%3D'round'%3E%3Cpath%20d%3D'M12%2020h9'%2F%3E%3Cpath%20d%3D'M16.5%203.5a2.1%202.1%200%200%201%203%203L7%2019l-4%201%201-4%2012.5-12.5z'%2F%3E%3C%2Fsvg%3E");
}

.format-heroplayer #courseindex a.courseindex-link::after {
    content: '';
    width: 18px;
    height: 18px;
    margin-left: auto;
    background-color: currentColor;
    -webkit-mask: var(--heroplayer-index-icon) center / contain no-repeat;
    mask: var(--heroplayer-index-icon) center / contain no-repeat;
    opacity: 0.9;
    flex-shrink: 0;
}

.format-heroplayer #courseindex li.courseindex-item.pageitem .courseindex-link,
.format-heroplayer #courseindex a.courseindex-link[aria-selected='true'] {
    color: var(--hero-muted) !important;
}

.format-heroplayer #courseindex .completioninfo.completion_complete ~ .courseindex-link,
.format-heroplayer #courseindex .completioninfo.completion_pass ~ .courseindex-link {
    color: #b23e32 !important;
    background: #fde8e2;
}

.format-heroplayer #courseindex .completioninfo.completion_fail ~ .courseindex-link {
    color: #9b1c1c !important;
}

.format-heroplayer #courseindex .completioninfo.completion_incomplete ~ .courseindex-link,
.format-heroplayer #courseindex .completioninfo.completion_none ~ .courseindex-link {
    background: #f7f7f7;
}

.format-heroplayer #courseindex li.courseindex-item[data-for='cm'] .courseindex-link:hover {
    background: #fef1ee;
}

.format-heroplayer #courseindex li.courseindex-item[data-for='cm'].heroplayer-index-active .courseindex-link {
    font-weight: 700;
}

.format-heroplayer #courseindex li.courseindex-item[data-for='cm'].restrictions,
.format-heroplayer #courseindex li.courseindex-item[data-for='cm'].dimmed {
    opacity: 0.9;
    background: #f7f7f7;
}

.format-heroplayer #courseindex li.courseindex-item[data-for='cm'].restrictions .courseindex-link,
.format-heroplayer #courseindex li.courseindex-item[data-for='cm'].dimmed .courseindex-link {
    background: #f7f7f7;
}

.format-heroplayer #courseindex li.courseindex-item.heroplayer-item-incomplete {
    background: #f7f7f7;
}

.format-heroplayer #courseindex li.courseindex-item.heroplayer-item-complete {
    background: #fde8e2;
}

.format-heroplayer #courseindex li.courseindex-item.heroplayer-item-incomplete .courseindex-link:hover {
    background: #f7f7f7;
}

.format-heroplayer #courseindex li.courseindex-item.heroplayer-item-complete .courseindex-link:hover {
    background: #fde8e2;
}

.format-heroplayer #courseindex .completioninfo {
    display: none;
}


.format-heroplayer #page-content,
.format-heroplayer #region-main,
.format-heroplayer .main-inner {
    padding: 0;
}

.format-heroplayer #region-main .card,
.format-heroplayer #region-main .card-body {
    padding: 0;
    margin: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
}

.heroplayer-layout * {
    box-sizing: border-box;
}

.heroplayer-layout {
    display: block;
}

.heroplayer-sidebar {
    background: var(--hero-panel);
    border: 1px solid var(--hero-accent-line);
    border-radius: 20px;
    box-shadow: 0 10px 24px rgba(211, 79, 63, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 420px;
}

.heroplayer-sidebar-inner {
    overflow-y: auto;
    max-height: 640px;
}

.heroplayer-section {
    border-bottom: 1px solid var(--hero-accent-line);
}

.heroplayer-section:last-child {
    border-bottom: none;
}

.heroplayer-section summary {
    list-style: none;
}

.heroplayer-section summary::-webkit-details-marker {
    display: none;
}

.heroplayer-section-summary {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    cursor: pointer;
    align-items: center;
    background: #fde8e2;
}

.heroplayer-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #b23e32;
}

.heroplayer-section-subtitle {
    font-size: 13px;
    color: #c16a60;
    margin-top: 4px;
}

.heroplayer-section-chevron {
    width: 24px;
    height: 24px;
    border: 1px solid var(--hero-accent-line);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #b23e32;
    transition: transform 0.2s ease;
}

.heroplayer-section-chevron::before {
    content: '▾';
    font-size: 14px;
    transform: translateY(-1px);
}

.heroplayer-section[open] .heroplayer-section-chevron {
    transform: rotate(180deg);
}

.heroplayer-modules {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #fff;
}

.heroplayer-module {
    border-bottom: 1px solid #f3d7cf;
}

.heroplayer-module:last-child {
    border-bottom: none;
}

.heroplayer-module-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease;
}

.heroplayer-module-link:hover {
    background: #fef1ee;
}

.heroplayer-module.is-active .heroplayer-module-link {
    background: #fdeae4;
}

.heroplayer-module-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.heroplayer-module-label {
    font-size: 14px;
    font-weight: 700;
    color: #b23e32;
}

.heroplayer-module-summary {
    font-size: 12px;
    color: var(--hero-muted);
}

.heroplayer-module-icon {
    width: 26px;
    height: 26px;
    opacity: 0.75;
    flex-shrink: 0;
}

.heroplayer-activity-navigation {
    border-top: 1px solid var(--hero-accent-line);
}

.heroplayer-nav-link {
    font-weight: 600;
    color: #c45d51;
}

.heroplayer-nav-link.is-disabled {
    opacity: 0.4;
    pointer-events: none;
}

.heroplayer-nav-link.is-hidden {
    display: none;
}

.heroplayer-main {
    position: relative;
    padding: 24px;
}

.heroplayer-hero {
    position: relative;
    background: #d7d7d7;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--hero-shadow);
    min-height: 320px;
    animation: heroplayer-rise 0.4s ease both;
}

.heroplayer-embed-stack,
.heroplayer-embed-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
}

.heroplayer-embed-stack {
    position: relative;
    background: #d7d7d7;
}

.heroplayer-embed-item {
    position: absolute;
    inset: 0;
    display: none;
}

.heroplayer-embed-item.is-active {
    display: block;
}

.heroplayer-embed-item > * {
    width: 100%;
    height: 100%;
}

.heroplayer-embed-item iframe,
.heroplayer-embed-item video,
.heroplayer-embed-item .vimeo-embed,
.heroplayer-embed-item .vimeo-container {
    width: 100%;
    height: 100%;
    display: block;
}

.heroplayer-embed-placeholder {
    background: linear-gradient(135deg, #d8d8d8, #efefef);
}

.heroplayer-hero-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 100%);
    color: #fff;
}

.heroplayer-hero-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 18px;
}

.heroplayer-hero-play {
    font-size: 20px;
}

.heroplayer-hero-fullscreen {
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    border-radius: 10px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.heroplayer-hero-back {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
    background: rgba(211, 79, 63, 0.9);
    border: none;
    color: #fff;
    font-weight: 700;
    border-radius: 10px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(211, 79, 63, 0.4);
}

.heroplayer-empty {
    padding: 24px;
    color: var(--hero-muted);
}

@keyframes heroplayer-rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1024px) {
    .format-heroplayer {
        --heroplayer-sidebar-width: 280px;
    }
}

@media (max-width: 900px) {
    .format-heroplayer #page {
        margin-left: 0 !important;
    }

    .format-heroplayer #theme_boost-drawers-courseindex {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
        top: 0 !important;
        height: 100vh !important;
        box-shadow: none;
    }

    .format-heroplayer #theme_boost-drawers-courseindex .drawercontent {
        padding: 16px 16px 24px;
    }

    .heroplayer-main {
        padding: 16px;
    }

    .heroplayer-hero {
        min-height: 220px;
    }

    .heroplayer-hero-title {
        font-size: 16px;
    }
}

@media (max-width: 600px) {
    .heroplayer-activity-navigation {
        padding-left: 16px;
        padding-right: 16px;
    }

    .heroplayer-hero-overlay {
        padding: 14px 16px;
    }
}
