/* ============================================================
   shared-interactive-styles.css — canonical union
   Source of truth for all diagram/interactive embeds.
   Accent colour here is amber (#f59e0b) — canonical hash 7ea6ed38.
   Drifted modules used: green (bio-m7), sky-blue (bio-m8),
   blue (sci-y8-u2, sci-y9-u2). Those modules rely on the
   shared base; per-module colour overrides live in each
   module's own CSS or inline <style> blocks.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300;1,9..40,400&display=swap');

/* ----- Reset ----- */
*{box-sizing:border-box;margin:0;padding:0}

/* ----- Base ----- */
body{font-family:'DM Sans',sans-serif;background:#0f172a;color:#e2e8f0;min-height:100vh;display:flex;flex-direction:column;align-items:center;padding:16px}
h1{font-size:1.2rem;font-weight:600;color:#f8fafc;margin-bottom:8px;text-align:center}
h2{font-size:1rem;font-weight:500;color:#94a3b8;margin-bottom:16px;text-align:center}

/* ----- Layout — container model (canonical) ----- */
.container{width:100%;max-width:960px;display:flex;flex-direction:column;gap:16px}
.stage{background:#1e293b;border-radius:12px;padding:20px;display:flex;flex-direction:column;align-items:center;gap:16px;min-height:280px}
.controls{background:#1e293b;border-radius:12px;padding:16px;display:flex;flex-wrap:wrap;gap:10px;justify-content:center;align-items:center}
.panel{background:#334155;border-radius:8px;padding:12px;width:100%;max-width:400px;display:flex;flex-direction:column;gap:8px}

/* ----- Layout — wrap model (sci-y9-u2 addition) ----- */
/* .wrap replaces .container in year-9 interactives */
.wrap{flex:1;max-width:1100px;width:100%;margin:0 auto;padding:20px 16px 28px;display:flex;flex-direction:column;gap:14px}
.header{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px}
.title{font-size:17px;font-weight:700}
.subtitle{font-size:12px;color:#94a3b8}

/* ----- Buttons — canonical accent: amber ----- */
/* bio-m7 used #16a34a green; bio-m8 used #0ea5e9 sky-blue;
   sci-y8-u2 used #3b82f6 blue; sci-y9-u2 used #2563eb blue */
.btn{background:#f59e0b;color:#fff;border:none;border-radius:8px;padding:8px 16px;font-family:inherit;font-size:.85rem;font-weight:500;cursor:pointer;transition:background .2s,transform .1s}
.btn:hover{background:#d97706}
.btn:active{transform:scale(.97)}
.btn.secondary{background:#475569}
.btn.secondary:hover{background:#64748b}
.btn.success{background:#22c55e}
.btn.success:hover{background:#16a34a}
.btn.danger{background:#ef4444}
.btn.danger:hover{background:#dc2626}
.btn:disabled{opacity:.5;cursor:not-allowed}

/* Flat-class button variants (sci-y9-u2 addition) */
.btn-secondary{background:#475569}
.btn-success{background:#16a34a}
.btn-danger{background:#dc2626}

/* ----- Feedback ----- */
/* .feedback.info accent: canonical amber; drifted modules used blue/sky */
.feedback{text-align:center;padding:12px 16px;border-radius:8px;font-size:.9rem;font-weight:500;min-height:44px;display:flex;align-items:center;justify-content:center}
.feedback.success{background:rgba(34,197,94,.15);color:#4ade80}
.feedback.error{background:rgba(239,68,68,.15);color:#f87171}
.feedback.info{background:rgba(245,158,11,.15);color:#fbbf24}
/* sci-y9-u2 named these .correct / .incorrect */
.feedback.correct{background:rgba(22,163,74,.15);color:#4ade80}
.feedback.incorrect{background:rgba(220,38,38,.15);color:#f87171}

/* ----- Grid ----- */
.grid{display:grid;gap:10px;width:100%}
.grid-2{grid-template-columns:repeat(2,1fr)}
.grid-3{grid-template-columns:repeat(3,1fr)}
.grid-4{grid-template-columns:repeat(4,1fr)}

/* ----- Cards — canonical accent: amber ----- */
/* bio-m7 used #1e3a2b background, #16a34a border; bio-m8 used #0ea5e9 border;
   sci-y8-u2 used #3b82f6; sci-y9-u2 used #2563eb */
.card{background:#334155;border-radius:8px;padding:12px;text-align:center;cursor:pointer;transition:transform .2s,border-color .2s;border:2px solid transparent;font-size:.85rem}
.card:hover{transform:translateY(-2px);border-color:#f59e0b}
.card.selected{border-color:#f59e0b;background:rgba(245,158,11,.15)}
.card.correct{border-color:#22c55e;background:rgba(34,197,94,.15)}
.card.wrong{border-color:#ef4444;background:rgba(239,68,68,.15)}

/* ----- Drag and drop ----- */
/* bio-m7 used #1e3a2b background, #16a34a dragover; bio-m8/sci-y8 used #0ea5e9/#3b82f6 */
.dropzone{background:#334155;border:2px dashed #64748b;border-radius:8px;padding:16px;text-align:center;min-height:60px;transition:border-color .2s}
.dropzone.dragover{border-color:#f59e0b;background:rgba(245,158,11,.1)}
.draggable{background:#475569;border-radius:6px;padding:8px 12px;cursor:grab;font-size:.85rem;transition:transform .2s}
.draggable:hover{background:#64748b}
.draggable.dragging{opacity:.5}
.slot{background:#334155;border:2px dashed #64748b;border-radius:8px;padding:12px;min-height:48px;display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap}
.slot.filled{border-style:solid;border-color:#22c55e;background:rgba(34,197,94,.1)}

/* ----- Score / legend ----- */
.score{font-size:.85rem;color:#94a3b8;text-align:center}
.legend{display:flex;gap:12px;flex-wrap:wrap;justify-content:center;font-size:.8rem;color:#94a3b8}
.legend span{display:flex;align-items:center;gap:4px}
.dot{width:12px;height:12px;border-radius:50%;display:inline-block}

/* ----- Simulation canvas ----- */
.sim-canvas{width:100%;max-width:600px;height:260px;background:#0f172a;border-radius:10px;position:relative;overflow:hidden;border:2px solid #334155}

/* ----- Slider wrapper (sci-y9-u2 addition) ----- */
.slider-wrap{display:flex;align-items:center;gap:10px}

/* ----- Form inputs ----- */
input[type=range]{width:100%;accent-color:#f59e0b}
input[type=number]{background:#0f172a;border:1px solid #475569;border-radius:6px;color:#f8fafc;padding:6px;text-align:center;font-family:inherit}

/* ----- bio-m7 specific additions (pathogen/timeline components) ----- */
.pathogen-cell{background:#0f172a;border-radius:10px;padding:14px;text-align:center;border:2px solid transparent;cursor:pointer;transition:all .2s}
.pathogen-cell:hover{border-color:#16a34a}
.pathogen-cell.active{border-color:#16a34a;background:rgba(22,163,74,.1)}
.timeline-step{display:flex;gap:12px;align-items:flex-start;padding:12px;border-radius:8px;background:#1e3a2b;border:2px solid transparent;cursor:pointer;transition:all .2s}
.timeline-step:hover{border-color:#16a34a}
.timeline-step.active{border-color:#16a34a;background:rgba(22,163,74,.1)}

/* ----- Responsive ----- */
@media(max-width:600px){.grid-4{grid-template-columns:repeat(2,1fr)}.grid-3{grid-template-columns:repeat(2,1fr)}}
