/* Interactive animations for the course parts (js/widgets-core.js + js/ode-widgets.js, js/interp-widgets.js). */
.course-widget {
    margin: 22px 0 6px;
    padding: 14px 16px 16px;
    color: #1f2b3d;
    background: #fff;
    border: 1px solid #d2dcf0;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(30, 60, 120, 0.08);
    font-family: "Open Sans", Arial, sans-serif;
    text-align: left;
}
.course-widget__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.course-widget__badge {
    flex: none;
    padding: 2px 8px;
    border-radius: 6px;
    background: #2b5fad;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.course-widget__title { color: #1b3461; font-size: 15px; font-weight: 700; line-height: 1.35; }
.course-widget__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 18px;
    margin-bottom: 12px;
    padding: 10px 12px;
    background: #f7f9fe;
    border: 1px solid #e1e8f5;
    border-radius: 10px;
}
.course-widget__field { display: flex; flex-direction: column; gap: 3px; min-width: 120px; font-size: 12.5px; }
.course-widget__field > span { color: #4c5a6e; font-weight: 600; }
.course-widget__field output { color: #1b3461; font-weight: 700; font-variant-numeric: tabular-nums; }
.course-widget__field select,
.course-widget__field input[type="range"] { min-height: 30px; font-size: 13px; accent-color: #2b5fad; }
.course-widget__field select {
    padding: 3px 6px;
    border: 1px solid #c9d5ea;
    border-radius: 6px;
    background: #fff;
    color: #1f2b3d;
}
.course-widget__check { display: flex; align-items: center; gap: 6px; min-height: 30px; font-size: 13px; color: #1f2b3d; cursor: pointer; }
.course-widget__check input { accent-color: #2b5fad; }
.course-widget__buttons { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.course-widget__button {
    min-height: 34px;
    padding: 5px 12px;
    border: 1px solid #2b5fad;
    border-radius: 8px;
    background: #fff;
    color: #2a5394;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.course-widget__button:hover { background: #e8eefa; }
.course-widget__button--primary { background: #2b5fad; color: #fff; }
.course-widget__button--primary:hover { background: #224c8c; }
.course-widget__button:focus-visible,
.course-widget__field select:focus-visible,
.course-widget__field input:focus-visible { outline: 3px solid #bd7416; outline-offset: 2px; }
.course-widget__plots { display: grid; grid-template-columns: 1fr; gap: 12px; }
.course-widget__plots--two { grid-template-columns: 1fr 1fr; }
.course-widget__plots canvas {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #fff;
    border: 1px solid #e1e8f5;
    border-radius: 8px;
    touch-action: manipulation;
}
.course-widget__plots--two canvas { aspect-ratio: 1 / 1; }
.course-widget__plots canvas.course-widget__canvas--wide { aspect-ratio: 16 / 9; }
.course-widget__legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 12.5px; color: #4c5a6e; }
.course-widget__legend i { display: inline-block; width: 18px; height: 3px; margin-right: 6px; vertical-align: middle; border-radius: 2px; }
.course-widget__legend i.is-dashed { height: 0; border-top: 2px dashed; }
.course-widget__readout {
    margin-top: 10px;
    padding: 8px 12px;
    background: #f7f9fe;
    border-left: 3px solid #2b5fad;
    border-radius: 0 8px 8px 0;
    color: #1f2b3d;
    font-family: "IBM Plex Mono", SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    line-height: 1.6;
    white-space: pre-wrap;
    font-variant-numeric: tabular-nums;
}
.course-widget__caption { margin: 10px 0 0; color: #4c5a6e; font-size: 13px; line-height: 1.55; }
.course-widget__fallback { margin: 0; color: #4c5a6e; font-size: 13px; font-style: italic; }
.course-widget.is-ready .course-widget__fallback { display: none; }

@media (max-width: 700px) {
    .course-widget { padding: 12px 10px 14px; }
    .course-widget__plots--two { grid-template-columns: 1fr; }
    .course-widget__plots--two canvas { aspect-ratio: 4 / 3; }
    .course-widget__buttons { margin-left: 0; }
    .course-widget__field { min-width: 100px; }
}
@media print {
    .course-widget__controls, .course-widget__buttons { display: none; }
}
