/* Aha! Bild – det som bara gäller Bild. Grunden (färger, sidhuvud, knappar, kort,
   lektionskort och uppgifter) står i ../delat/aha.css. Inga färger här, bara variabler. */

.bild-sida { padding-block: clamp(24px, 4vw, 48px) 64px; }
.bild-smal { max-width: 34em; margin-inline: auto; }
.bild-topp { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }
.bild-rad { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.bild-lista { padding: 0; list-style: none; }
.bild-lista > li { display: flex; }
.bild-lista > li > * { flex: 1; min-width: 0; }
.bild-steg { padding: 0; list-style: none; }
.bild-ikon { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.bild-antal { margin-left: 6px; font-weight: 400; color: var(--text-2); }
.bild-sok { max-width: 30em; }
.bild-dolj { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.bild-falt { border: 0; padding: 0; margin: 0; min-width: 0; }
.bild-falt legend { padding: 0; margin-bottom: 12px; }

/* Siffror på översikten och under Min utveckling */
.bild-siffror { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 16px; margin: 0; }
.bild-siffror div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 2px; }
.bild-siffror dt { color: var(--text-2); }
.bild-siffror dd { margin: 0; font-family: var(--typ-rubrik); font-weight: var(--rubrik-vikt); font-size: 2.4rem; line-height: 1; }

/* Fota */
.bild-kallor .alt { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.bild-fota { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; border-style: dashed; }
.bild-analys { display: flex; align-items: center; gap: 16px; }
.bild-analys img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--radie-liten); border: 1px solid var(--linje); flex: none; }
.bild-val { display: flex; align-items: flex-start; gap: 12px; }
.bild-valtext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bild-markering {
  width: 30px; height: 30px; flex: none; border-radius: 50%; border: 2px solid currentColor;
  display: inline-flex; align-items: center; justify-content: center;
}
.alt[aria-pressed="true"] .bild-markering { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.bild-fler summary { min-height: 44px; display: flex; align-items: center; font-weight: 700; cursor: pointer; }
.bild-formular { margin-top: 12px; }
.bild-formular .falt { width: 100%; }

.bild-laddar { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.bild-snurra {
  width: 40px; height: 40px; border-radius: 50%;
  border: 4px solid var(--linje); border-top-color: var(--accent);
}
@media (prefers-reduced-motion: no-preference) {
  .bild-snurra { animation: bild-snurr 0.9s linear infinite; }
  a.lektionskort, .bild-knappkort { transition: transform 0.15s ease; }
  .bild-knappkort:hover { transform: translateY(-2px); }
}
@keyframes bild-snurr { to { transform: rotate(360deg); } }

/* Lektionen och passet */
.bild-knappkort { font: inherit; text-align: left; cursor: pointer; width: 100%; }
.alt b { display: inline-flex; width: 1.6em; }
.alt:disabled { cursor: default; }
.alt.alt-ratt { border-color: var(--accent); background: var(--accent-svag); color: var(--accent-svag-text); font-weight: 700; }
.alt.alt-fel { border-color: var(--sol); background: var(--sol-svag); color: var(--sol-svag-text); }
.bild-radbryt { white-space: pre-wrap; font-weight: 700; }
.besked details summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.besked blockquote { margin: 0; padding-left: 12px; border-left: 3px solid currentColor; }
.besked ul { margin: 0; padding-left: 1.2em; }
.bild-poang { font-family: var(--typ-rubrik); font-weight: var(--rubrik-vikt); font-size: clamp(3rem, 2rem + 4vw, 4.5rem); line-height: 1; }
.bild-poang span { font-size: 0.4em; color: var(--text-2); }
.slut .knapprad { margin-top: 8px; }

/* Ämnestabellen */
.bild-tabell { overflow-x: auto; }
.bild-tabell table { width: 100%; border-collapse: collapse; }
.bild-tabell th, .bild-tabell td { padding: 10px 8px; text-align: left; border-bottom: 1px solid var(--linje); vertical-align: middle; }
.bild-tabell th { font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-2); }

/* Profiler och historik */
.bild-bokstav { font-family: var(--typ-rubrik); font-weight: 800; font-size: 1.5rem; }
.bild-historik a { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; width: 100%; min-height: 44px; color: var(--text); text-decoration: none; }
.bild-historik a:hover strong { text-decoration: underline; }

.bild-toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 10;
  width: max-content; max-width: calc(100% - 32px); padding: 14px 18px;
  border-radius: var(--radie-liten); background: var(--text); color: var(--yta); font-weight: 700;
}

@media (max-width: 520px) {
  .bild-siffror dd { font-size: 2rem; }
  .bild-topp > .knapp { width: 100%; }
}

.bild-historik { display: flex; flex-direction: column; padding: 0; margin: 0; list-style: none; }
.bild-historik li { padding-block: 10px; border-top: 1px solid var(--linje); }
.bild-historik li:first-child { border-top: 0; }
.bild-historik-text { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
