.ddm-detail {
    --ddm-detail-ink: #1f2937;
    --ddm-detail-muted: #64748b;
    --ddm-detail-line: #d9e2ec;
    --ddm-detail-surface: #fff;
    --ddm-detail-soft: #f8fafc;
    --ddm-detail-accent: #0f766e;
    --ddm-detail-accent-soft: #e7f7f3;
    --ddm-detail-accent-border: #a7f3d0;
    --ddm-detail-blue-soft: #eaf3ff;
    --ddm-detail-blue: #1d4ed8;
    --ddm-detail-danger: #b42318;
    --ddm-detail-danger-soft: #fff1f0;
    --ddm-detail-danger-border: #fecaca;
    --ddm-detail-status-bg: #fff7e6;
    --ddm-detail-status-text: #7a4b00;
    color: var(--ddm-detail-ink);
}

[data-bs-theme="dark"] .ddm-detail,
[data-theme="dark"] .ddm-detail,
body.dark .ddm-detail {
    --ddm-detail-ink: #f1f5f9;
    --ddm-detail-muted: #a7b4c6;
    --ddm-detail-line: #334155;
    --ddm-detail-surface: #111827;
    --ddm-detail-soft: #0f172a;
    --ddm-detail-accent: #5eead4;
    --ddm-detail-accent-soft: rgba(20, 184, 166, 0.14);
    --ddm-detail-accent-border: rgba(94, 234, 212, 0.42);
    --ddm-detail-blue-soft: rgba(96, 165, 250, 0.15);
    --ddm-detail-blue: #93c5fd;
    --ddm-detail-danger: #fca5a5;
    --ddm-detail-danger-soft: rgba(248, 113, 113, 0.14);
    --ddm-detail-danger-border: rgba(252, 165, 165, 0.38);
    --ddm-detail-status-bg: rgba(245, 158, 11, 0.16);
    --ddm-detail-status-text: #fcd34d;
}

@media (prefers-color-scheme: dark) {
    html[data-bs-theme="auto"] .ddm-detail {
        --ddm-detail-ink: #f1f5f9;
        --ddm-detail-muted: #a7b4c6;
        --ddm-detail-line: #334155;
        --ddm-detail-surface: #111827;
        --ddm-detail-soft: #0f172a;
        --ddm-detail-accent: #5eead4;
        --ddm-detail-accent-soft: rgba(20, 184, 166, 0.14);
        --ddm-detail-accent-border: rgba(94, 234, 212, 0.42);
        --ddm-detail-blue-soft: rgba(96, 165, 250, 0.15);
        --ddm-detail-blue: #93c5fd;
        --ddm-detail-danger: #fca5a5;
        --ddm-detail-danger-soft: rgba(248, 113, 113, 0.14);
        --ddm-detail-danger-border: rgba(252, 165, 165, 0.38);
        --ddm-detail-status-bg: rgba(245, 158, 11, 0.16);
        --ddm-detail-status-text: #fcd34d;
    }
}

.ddm-detail-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 2rem 0 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--ddm-detail-line);
}

.ddm-detail-eyebrow {
    margin: 0 0 .45rem;
    color: var(--ddm-detail-accent);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.ddm-detail-title {
    margin: 0;
    color: var(--ddm-detail-ink);
    font-size: 2.55rem;
    line-height: 1.12;
    font-weight: 750;
    letter-spacing: 0;
}

.ddm-detail-subtitle {
    margin: .65rem 0 0;
    color: var(--ddm-detail-muted);
    font-size: 1.08rem;
    line-height: 1.45;
}

.ddm-detail-actions {
    display: flex;
    justify-content: flex-end;
    flex: 0 0 auto;
    max-width: 18rem;
}

.ddm-detail-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 2.75rem;
    border-radius: 8px;
    white-space: normal;
    text-align: center;
}

.ddm-detail-status {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-height: 2.5rem;
    padding: .55rem .85rem;
    border-radius: 8px;
    background: var(--ddm-detail-status-bg);
    color: var(--ddm-detail-status-text);
    font-size: .95rem;
    font-weight: 700;
}

.ddm-detail-layout {
    row-gap: 1.5rem;
}

.ddm-detail-panel,
.ddm-detail-content {
    height: 100%;
    border: 1px solid var(--ddm-detail-line);
    border-radius: 8px;
    background: var(--ddm-detail-surface);
}

.ddm-detail-panel {
    padding: 1.25rem;
    background: var(--ddm-detail-soft);
}

.ddm-detail-content {
    padding: 1.4rem;
}

.ddm-detail-panel-title,
.ddm-detail-content-title,
.ddm-detail-section-title {
    margin: 0;
    color: var(--ddm-detail-ink);
    font-weight: 750;
    letter-spacing: 0;
}

.ddm-detail-panel-title,
.ddm-detail-content-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.ddm-detail-facts {
    display: grid;
    gap: .85rem;
}

.ddm-detail-fact {
    display: grid;
    grid-template-columns: 2.4rem minmax(0, 1fr);
    gap: .75rem;
    align-items: start;
}

.ddm-detail-fact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 8px;
    background: var(--ddm-detail-blue-soft);
    color: var(--ddm-detail-blue);
    font-size: 1.05rem;
}

.ddm-detail-fact-label {
    display: block;
    margin-bottom: .1rem;
    color: var(--ddm-detail-muted);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.ddm-detail-fact-value {
    display: block;
    color: var(--ddm-detail-ink);
    font-size: .98rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.ddm-detail-capacity {
    margin-top: 1.15rem;
    padding: 1rem;
    border: 1px solid var(--ddm-detail-accent-border);
    border-left: 5px solid var(--ddm-detail-accent);
    border-radius: 8px;
    background: var(--ddm-detail-accent-soft);
}

.ddm-detail-capacity.is-full {
    border-color: var(--ddm-detail-danger-border);
    border-left-color: var(--ddm-detail-danger);
    background: var(--ddm-detail-danger-soft);
}

.ddm-detail-capacity-label {
    display: flex;
    align-items: center;
    gap: .45rem;
    color: var(--ddm-detail-muted);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.ddm-detail-capacity-number {
    margin: .2rem 0;
    color: var(--ddm-detail-accent);
    font-size: 2.45rem;
    line-height: 1;
    font-weight: 800;
}

.ddm-detail-capacity.is-full .ddm-detail-capacity-number {
    color: var(--ddm-detail-danger);
}

.ddm-detail-capacity-meta,
.ddm-detail-capacity-note {
    margin: 0;
    color: var(--ddm-detail-muted);
    font-size: .95rem;
    line-height: 1.45;
}

.ddm-detail-capacity-note {
    margin-top: .45rem;
    color: var(--ddm-detail-ink);
}

.ddm-detail-capacity-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-top: .65rem;
    color: var(--ddm-detail-danger);
    font-weight: 700;
}

.ddm-detail-schedule {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--ddm-detail-line);
}

.ddm-detail-schedule-title {
    margin: 0 0 .75rem;
    color: var(--ddm-detail-ink);
    font-size: 1rem;
    font-weight: 750;
}

.ddm-detail-schedule-list {
    display: grid;
    gap: .7rem;
}

.ddm-detail-schedule-item {
    padding: .85rem;
    border: 1px solid var(--ddm-detail-line);
    border-radius: 8px;
    background: var(--ddm-detail-surface);
}

.ddm-detail-schedule-time {
    display: flex;
    align-items: center;
    gap: .45rem;
    color: var(--ddm-detail-ink);
    font-weight: 750;
}

.ddm-detail-schedule-meta,
.ddm-detail-schedule-teacher {
    margin-top: .35rem;
    color: var(--ddm-detail-muted);
    font-size: .92rem;
    line-height: 1.4;
}

.ddm-detail-section {
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--ddm-detail-line);
}

.ddm-detail-section:first-of-type {
    padding-top: 0;
    margin-top: 0;
    border-top: 0;
}

.ddm-detail-section-title {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin-bottom: .45rem;
    font-size: 1.04rem;
}

.ddm-detail-section-body {
    color: var(--ddm-detail-ink);
    line-height: 1.7;
}

.ddm-detail-section-body p,
.ddm-detail-section-body li {
    color: var(--ddm-detail-ink);
}

.ddm-detail-section-body p:last-child,
.ddm-detail-section-body :last-child {
    margin-bottom: 0;
}

.ddm-detail-file-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem .75rem;
    border: 1px solid var(--ddm-detail-line);
    border-radius: 8px;
    background: var(--ddm-detail-soft);
    color: var(--ddm-detail-blue);
    font-weight: 700;
}

.ddm-detail .ddm-detail-file-link {
    color: var(--ddm-detail-blue) !important;
}

.ddm-detail .ddm-detail-capacity-link {
    color: var(--ddm-detail-danger) !important;
}

.ddm-detail-consent-note {
    padding: .85rem 1rem;
    border-radius: 8px;
    background: var(--ddm-detail-danger-soft);
    color: var(--ddm-detail-danger);
    font-weight: 700;
}

html[data-bs-theme="dark"] .ddm-detail,
[data-theme="dark"] .ddm-detail,
body.dark .ddm-detail {
    color: #f1f5f9 !important;
}

html[data-bs-theme="dark"] .ddm-detail .ddm-detail-title,
html[data-bs-theme="dark"] .ddm-detail .ddm-detail-panel-title,
html[data-bs-theme="dark"] .ddm-detail .ddm-detail-content-title,
html[data-bs-theme="dark"] .ddm-detail .ddm-detail-section-title,
html[data-bs-theme="dark"] .ddm-detail .ddm-detail-schedule-title,
html[data-bs-theme="dark"] .ddm-detail .ddm-detail-fact-value,
html[data-bs-theme="dark"] .ddm-detail .ddm-detail-schedule-time,
html[data-bs-theme="dark"] .ddm-detail .ddm-detail-section-body,
html[data-bs-theme="dark"] .ddm-detail .ddm-detail-section-body p,
html[data-bs-theme="dark"] .ddm-detail .ddm-detail-section-body li,
[data-theme="dark"] .ddm-detail .ddm-detail-title,
[data-theme="dark"] .ddm-detail .ddm-detail-panel-title,
[data-theme="dark"] .ddm-detail .ddm-detail-content-title,
[data-theme="dark"] .ddm-detail .ddm-detail-section-title,
[data-theme="dark"] .ddm-detail .ddm-detail-schedule-title,
[data-theme="dark"] .ddm-detail .ddm-detail-fact-value,
[data-theme="dark"] .ddm-detail .ddm-detail-schedule-time,
[data-theme="dark"] .ddm-detail .ddm-detail-section-body,
[data-theme="dark"] .ddm-detail .ddm-detail-section-body p,
[data-theme="dark"] .ddm-detail .ddm-detail-section-body li,
body.dark .ddm-detail .ddm-detail-title,
body.dark .ddm-detail .ddm-detail-panel-title,
body.dark .ddm-detail .ddm-detail-content-title,
body.dark .ddm-detail .ddm-detail-section-title,
body.dark .ddm-detail .ddm-detail-schedule-title,
body.dark .ddm-detail .ddm-detail-fact-value,
body.dark .ddm-detail .ddm-detail-schedule-time,
body.dark .ddm-detail .ddm-detail-section-body,
body.dark .ddm-detail .ddm-detail-section-body p,
body.dark .ddm-detail .ddm-detail-section-body li {
    color: #f1f5f9 !important;
}

html[data-bs-theme="dark"] .ddm-detail .ddm-detail-subtitle,
html[data-bs-theme="dark"] .ddm-detail .ddm-detail-fact-label,
html[data-bs-theme="dark"] .ddm-detail .ddm-detail-schedule-meta,
html[data-bs-theme="dark"] .ddm-detail .ddm-detail-schedule-teacher,
html[data-bs-theme="dark"] .ddm-detail .ddm-detail-capacity-label,
html[data-bs-theme="dark"] .ddm-detail .ddm-detail-capacity-meta,
[data-theme="dark"] .ddm-detail .ddm-detail-subtitle,
[data-theme="dark"] .ddm-detail .ddm-detail-fact-label,
[data-theme="dark"] .ddm-detail .ddm-detail-schedule-meta,
[data-theme="dark"] .ddm-detail .ddm-detail-schedule-teacher,
[data-theme="dark"] .ddm-detail .ddm-detail-capacity-label,
[data-theme="dark"] .ddm-detail .ddm-detail-capacity-meta,
body.dark .ddm-detail .ddm-detail-subtitle,
body.dark .ddm-detail .ddm-detail-fact-label,
body.dark .ddm-detail .ddm-detail-schedule-meta,
body.dark .ddm-detail .ddm-detail-schedule-teacher,
body.dark .ddm-detail .ddm-detail-capacity-label,
body.dark .ddm-detail .ddm-detail-capacity-meta {
    color: #a7b4c6 !important;
}

html[data-bs-theme="dark"] .ddm-detail .ddm-detail-panel,
html[data-bs-theme="dark"] .ddm-detail .ddm-detail-content,
html[data-bs-theme="dark"] .ddm-detail .ddm-detail-schedule-item,
[data-theme="dark"] .ddm-detail .ddm-detail-panel,
[data-theme="dark"] .ddm-detail .ddm-detail-content,
[data-theme="dark"] .ddm-detail .ddm-detail-schedule-item,
body.dark .ddm-detail .ddm-detail-panel,
body.dark .ddm-detail .ddm-detail-content,
body.dark .ddm-detail .ddm-detail-schedule-item {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

html[data-bs-theme="dark"] .ddm-detail .ddm-detail-fact-icon,
[data-theme="dark"] .ddm-detail .ddm-detail-fact-icon,
body.dark .ddm-detail .ddm-detail-fact-icon {
    background: rgba(96, 165, 250, 0.15) !important;
    color: #93c5fd !important;
}

@media (prefers-color-scheme: dark) {
    html[data-bs-theme="auto"] .ddm-detail {
        color: #f1f5f9 !important;
    }

    html[data-bs-theme="auto"] .ddm-detail .ddm-detail-title,
    html[data-bs-theme="auto"] .ddm-detail .ddm-detail-panel-title,
    html[data-bs-theme="auto"] .ddm-detail .ddm-detail-content-title,
    html[data-bs-theme="auto"] .ddm-detail .ddm-detail-section-title,
    html[data-bs-theme="auto"] .ddm-detail .ddm-detail-schedule-title,
    html[data-bs-theme="auto"] .ddm-detail .ddm-detail-fact-value,
    html[data-bs-theme="auto"] .ddm-detail .ddm-detail-schedule-time,
    html[data-bs-theme="auto"] .ddm-detail .ddm-detail-section-body,
    html[data-bs-theme="auto"] .ddm-detail .ddm-detail-section-body p,
    html[data-bs-theme="auto"] .ddm-detail .ddm-detail-section-body li {
        color: #f1f5f9 !important;
    }

    html[data-bs-theme="auto"] .ddm-detail .ddm-detail-subtitle,
    html[data-bs-theme="auto"] .ddm-detail .ddm-detail-fact-label,
    html[data-bs-theme="auto"] .ddm-detail .ddm-detail-schedule-meta,
    html[data-bs-theme="auto"] .ddm-detail .ddm-detail-schedule-teacher,
    html[data-bs-theme="auto"] .ddm-detail .ddm-detail-capacity-label,
    html[data-bs-theme="auto"] .ddm-detail .ddm-detail-capacity-meta {
        color: #a7b4c6 !important;
    }

    html[data-bs-theme="auto"] .ddm-detail .ddm-detail-panel,
    html[data-bs-theme="auto"] .ddm-detail .ddm-detail-content,
    html[data-bs-theme="auto"] .ddm-detail .ddm-detail-schedule-item {
        background: #0f172a !important;
        border-color: #334155 !important;
        color: #f1f5f9 !important;
    }

    html[data-bs-theme="auto"] .ddm-detail .ddm-detail-fact-icon {
        background: rgba(96, 165, 250, 0.15) !important;
        color: #93c5fd !important;
    }
}

@media (max-width: 767.98px) {
    .ddm-detail-hero {
        flex-direction: column;
        padding-top: 1.25rem;
    }

    .ddm-detail-title {
        font-size: 1.9rem;
    }

    .ddm-detail-actions,
    .ddm-detail-action {
        width: 100%;
        max-width: none;
    }
}
