/* side-3d.css — pladsen til 3D-scenen i heroen på teori-, problem- og oversigtssiderne.
   Brede skærme: scenen står til højre for teksten. Smalle: under teksten, aldrig oven på den. */

.sd3d-stage { position: absolute; top: 0; right: 0; bottom: 0; width: 54%; z-index: 0; pointer-events: none;
  opacity: 0; transition: opacity .9s cubic-bezier(.22, .8, .24, 1);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%); mask-image: linear-gradient(90deg, transparent 0, #000 14%); }
.sd3d-klar .sd3d-stage { opacity: 1; }
.sd3d-laerred { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.sd3d-etiketter { position: absolute; inset: 0; overflow: hidden; }

/* teksten får venstre halvdel, når der er en scene */
.hero.sd3d-plads > :not(.sd3d-stage), .sd-oversigt-hero.sd3d-plads > :not(.sd3d-stage) { position: relative; z-index: 1; max-width: min(620px, 50%); }
.hero.sd3d-plads, .sd-oversigt-hero.sd3d-plads { min-height: 430px; }

.sd3d-etiket { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 6px; max-width: 190px;
  padding: 5px 11px; border-radius: 999px; font-size: .74rem; font-weight: 750; line-height: 1.25; letter-spacing: .005em;
  color: #eafcff; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: rgba(13, 32, 56, .62); border: 1px solid rgba(123, 228, 238, .32);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 8px 20px -12px rgba(0, 0, 0, .8); pointer-events: auto; cursor: pointer;
  transition: opacity .35s, background .2s, border-color .2s, box-shadow .2s; will-change: transform, opacity; }
.sd3d-etiket b { display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; font-size: .66rem;
  background: linear-gradient(135deg, #12c4a8, #5fe1cf); color: #06202a; }
.sd3d-etiket:hover, .sd3d-etiket.er-aktiv { background: rgba(18, 196, 168, .9); color: #04202a; border-color: transparent; box-shadow: 0 10px 26px -10px rgba(18, 196, 168, .9); }
.sd3d-etiket:hover b, .sd3d-etiket.er-aktiv b { background: #06202a; color: #7be9da; }
.sd3d-etiket--hoejre { max-width: 230px; }

/* når man hopper til et begreb fra scenen, blinker kortet kort */
@keyframes sd3d-blink { 0% { box-shadow: 0 0 0 0 rgba(18, 196, 168, .0); } 25% { box-shadow: 0 0 0 5px rgba(18, 196, 168, .55); } 100% { box-shadow: 0 0 0 0 rgba(18, 196, 168, 0); } }
.sd3d-blink { animation: sd3d-blink 1.6s ease-out; }

@media (max-width: 900px) {
  .sd3d-stage { position: relative; display: block; width: auto; height: 250px; margin: 6px calc(-1 * clamp(20px, 5vw, 60px)) calc(-1 * clamp(32px, 5vw, 54px));
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 20%); mask-image: linear-gradient(180deg, transparent 0, #000 20%); }
  .hero.sd3d-plads > :not(.sd3d-stage), .sd-oversigt-hero.sd3d-plads > :not(.sd3d-stage) { max-width: none; }
  .hero.sd3d-plads, .sd-oversigt-hero.sd3d-plads { min-height: 0; }
  .sd3d-etiket { font-size: .72rem; max-width: 70vw; }
}
@media (max-width: 600px) { .sd3d-stage { height: 220px; } }

/* Braden-scenen (braden3d.js): trykpunkternes etiketter og status nederst */
.bd-etiket { pointer-events: none; padding: 3px 9px 3px 6px; }
.bd-prik { width: 10px !important; min-width: 10px !important; height: 10px !important; padding: 0 !important; border-radius: 50% !important; box-shadow: 0 0 0 2px rgba(255,255,255,.18); transition: background .3s; }
.bd-etiket.bd-roed { border-color: rgba(226, 52, 47, .75); box-shadow: 0 8px 22px -8px rgba(226, 52, 47, .8); }
.bd-status { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 12px;
  max-width: calc(100% - 24px); padding: 7px 12px; border-radius: 14px; background: rgba(6, 18, 38, .72); border: 1px solid rgba(147, 197, 253, .22);
  color: #e6f2ff; font-size: .74rem; font-weight: 650; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); pointer-events: auto; }
.bd-score { white-space: nowrap; }
.bd-status[data-baand="0"] .bd-score { color: #7ee2a8; }
.bd-status[data-baand="1"] .bd-score { color: #f2d36b; }
.bd-status[data-baand="2"] .bd-score { color: #f6a35c; }
.bd-status[data-baand="3"] .bd-score, .bd-status[data-baand="4"] .bd-score { color: #ff8a80; }
.bd-tid { color: rgba(230, 242, 255, .72); font-weight: 550; white-space: nowrap; }
.bd-link { color: #7be9da; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
@media (max-width: 900px) { .sd3d-stage.bd-stage { height: 330px; } .bd-status { bottom: 6px; padding: 5px 10px; gap: 2px 10px; border-radius: 12px; } }
@media (max-width: 600px) { .bd-status { font-size: .66rem; } .bd-etiket { font-size: .64rem; } }

/* Teorisidernes egne scener (teori3d-ramme.js): panel med knapper og status, farvede etiketter */
.ts-etiket { pointer-events: none; }
.ts-etiket.ts-gron { border-color: rgba(126, 226, 168, .6); color: #c9f7dc; }
.ts-etiket.ts-roed { border-color: rgba(255, 138, 128, .65); color: #ffd3cf; }
.ts-etiket.ts-gul { border-color: rgba(242, 184, 75, .65); color: #ffe7b3; }
.ts-etiket.ts-blaa { border-color: rgba(96, 165, 250, .65); color: #d6e8ff; }
.ts-etiket.ts-teal { border-color: rgba(31, 209, 178, .65); color: #c6fbf1; }
.ts-panel { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: max-content; max-width: calc(100% - 24px); padding: 8px 10px; border-radius: 14px; background: rgba(6, 18, 38, .74); border: 1px solid rgba(147, 197, 253, .22);
  color: #e6f2ff; font-size: .74rem; font-weight: 650; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); pointer-events: auto; z-index: 2; }
.ts-knapper { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
.ts-chip { font: inherit; font-size: .72rem; font-weight: 700; padding: 5px 10px; border-radius: 999px; cursor: pointer; color: #cfe3ff;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(147, 197, 253, .3); transition: background .2s, color .2s, border-color .2s; }
.ts-chip:hover { border-color: rgba(94, 200, 189, .8); }
.ts-chip[aria-pressed="true"] { background: rgba(18, 196, 168, .9); color: #04202a; border-color: transparent; }
.ts-chip:focus-visible { outline: 2px solid #7be9da; outline-offset: 2px; }
.ts-status { text-align: center; line-height: 1.35; }
.ts-status b { font-weight: 800; }
.ts-status[data-niveau="0"] { color: #9ff0c4; }
.ts-status[data-niveau="1"] { color: #f6d98a; }
.ts-status[data-niveau="2"] { color: #ffb4a8; }
@media (max-width: 900px) { .sd3d-stage.ts-stage { height: 360px; } .ts-panel { bottom: 6px; padding: 6px 8px; } }
@media (max-width: 600px) { .ts-panel { font-size: .68rem; } .ts-chip { font-size: .66rem; padding: 4px 8px; } }

@media print { .sd3d-stage { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .sd3d-stage { transition: none; } .sd3d-blink { animation: none; } }
@media (max-width: 900px) {
  .sd-oversigt-hero .sd3d-stage { margin: 6px calc(-1 * clamp(20px, 5vw, 56px)) calc(-1 * clamp(34px, 6vw, 64px)); }
}

/* Scener med mange knapper (sektor3d): på mobilen én række, der kan skubbes sideværts */
@media (max-width: 600px) {
  .ts-panel--mange { left: 8px; right: 8px; transform: none; width: auto; max-width: none; }
  .ts-panel--mange .ts-knapper { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; max-width: 100%; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .ts-panel--mange .ts-knapper::-webkit-scrollbar { display: none; }
  .ts-panel--mange .ts-chip { flex: 0 0 auto; }
  .ts-panel--mange .ts-status { font-size: .66rem; }
}
