/*
  Media Describer -- LCA English & Communications.
  Copyright (c) 2017-2026 Coding Ireland. All rights reserved. Ref: CI-english-media-describer
*/

/* The activity framework toggles visibility with [hidden]; without this the
   framework's own display rules win and hidden panels still show. */
.md-activity [hidden] { display: none !important; }

.md-container { display: flex; flex-direction: column; gap: 0.9rem; }

/* ----------------------------------------------------------------- top bar */
.md-topbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    min-height: 1.4rem;
}

.md-medium {
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 0.78rem;
    background: #6a3d8f;
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
}

.md-marks { font-weight: 700; color: #46505e; font-size: 0.85rem; }

.md-saved {
    margin-left: auto;
    font-size: 0.82rem;
    color: #5a6472;
    min-height: 1em;
}

.md-preview-warning {
    margin: 0;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    background: #fff4e5;
    border: 1px solid #f0c27b;
    color: #8a5a00;
    font-weight: 600;
    font-size: 0.88rem;
}

/* ------------------------------------------------------------------- brief */
.md-brief {
    background: #f6f2fa;
    border: 1px solid #ddd0e8;
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
}

.md-brief-heading {
    margin: 0 0 0.45rem;
    font-size: 0.95rem;
    font-weight: 800;
    color: #4d2a6b;
}

.md-brief-body { font-size: 0.95rem; line-height: 1.6; color: #2b2233; }
.md-brief-body p { margin: 0 0 0.6rem; }
.md-brief-body p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------------- stage */
.md-stage {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 21rem);
    gap: 1rem;
    align-items: start;
}

@media (max-width: 900px) {
    .md-stage { grid-template-columns: minmax(0, 1fr); }
}

.md-write {
    background: #fff;
    border: 1px solid #dde3ea;
    border-radius: 12px;
    padding: 0.9rem 1.1rem;
    min-width: 0;
}

.md-write-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.6rem;
}

.md-write-title { margin: 0; font-size: 1rem; font-weight: 800; color: #1f2933; }
.md-count { font-size: 0.82rem; color: #6b7684; font-weight: 600; }

.md-write-note { margin: 0.35rem 0 0.6rem; font-size: 0.82rem; color: #6b7684; }

.md-input {
    width: 100%;
    border: 1px solid #ccd4de;
    border-radius: 8px;
    padding: 0.7rem;
    font-family: inherit;
    font-size: 0.98rem;
    line-height: 1.6;
    resize: vertical;
}

/* ---------------------------------------------------------------- elements */
.md-side {
    background: #f7f9fc;
    border: 1px solid #dde3ea;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    min-width: 0;
}

.md-side-heading { margin: 0 0 0.3rem; font-size: 0.95rem; font-weight: 800; color: #1f2933; }
.md-side-note { margin: 0 0 0.7rem; font-size: 0.8rem; color: #6b7684; }

.md-elements { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }

.md-element {
    border: 1px solid #e0e6ed;
    border-left: 3px solid #cdd6e0;
    border-radius: 8px;
    background: #fff;
    padding: 0.5rem 0.6rem;
}

.md-element.is-seen { border-left-color: #d79a2b; background: #fffaf0; }
.md-element.is-covered { border-left-color: #2e8b57; background: #f4fbf6; }

.md-element-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    margin: 0;
}

.md-tick { width: 1rem; height: 1rem; margin-top: 0.15rem; flex: none; }

.md-element-name { font-weight: 700; font-size: 0.88rem; color: #26313c; line-height: 1.35; }

.md-element-hint { margin: 0.25rem 0 0 1.5rem; font-size: 0.78rem; color: #6b7684; }

.md-element-flag {
    display: block;
    margin: 0.3rem 0 0 1.5rem;
    font-size: 0.76rem;
    font-weight: 600;
    color: #8a5a00;
}

/* ---------------------------------------------------------------- progress */
.md-progress { margin-top: 0.85rem; }

.md-bar {
    height: 8px;
    background: #e3e8ee;
    border-radius: 999px;
    overflow: hidden;
}

.md-bar-fill {
    display: block;
    height: 100%;
    width: 0;
    background: #2e8b57;
    transition: width 0.2s ease;
}

.md-progress-text { margin: 0.35rem 0 0; font-size: 0.8rem; color: #46505e; font-weight: 600; }

.md-missing { margin-top: 0.85rem; }
.md-sub-heading { margin: 0 0 0.3rem; font-size: 0.84rem; font-weight: 800; color: #8a5a00; }
.md-missing-list { margin: 0; padding-left: 1.1rem; font-size: 0.83rem; color: #46505e; }
.md-missing-list li { margin-bottom: 0.2rem; }

/* ---------------------------------------------------------------- exemplar */
.md-exemplar summary {
    cursor: pointer;
    font-weight: 700;
    color: #4d2a6b;
    font-size: 0.9rem;
}

.md-exemplar-body {
    margin-top: 0.6rem;
    padding: 0.8rem 1rem;
    background: #faf8fc;
    border: 1px solid #e3d9ec;
    border-radius: 10px;
    font-size: 0.93rem;
    line-height: 1.6;
    color: #2b2233;
}

/* ------------------------------------------------------- whiteboard display */
body.display-mode .md-side,
body.display-mode .md-write-note { display: none !important; }

body.display-mode .md-brief-body { font-size: 1.3rem; line-height: 1.7; }
