/*
 * /samvaersplan. Bygger oven paa /assets/side.css (tokens, .field, .box,
 * footer). Farverne for forælder A/B gaelder baade skaerm og print.
 */
:root{
  --pa:#f6c1d6;
  --pa-strong:#d9578c;
  --pb:#bfe0f7;
  --pb-strong:#2f8fd1;
  --out:#f0eee9;
  --on-accent:#ffffff;
}
@media (prefers-color-scheme: dark){
  :root{
    --pa:#6b3550;
    --pa-strong:#f08bb5;
    --pb:#244a66;
    --pb-strong:#6fbcf0;
    --out:#22252b;
    --on-accent:#15171b;
  }
}

.wrap.wide{ max-width:1080px; }
.sp-top{ display:flex; justify-content:space-between; align-items:center; margin:0 0 28px; font-size:15px; }
.sp-top a{ text-decoration:none; font-weight:700; color:var(--text); }
/* Store-badges: Apple uden luft, Googles PNG med ca. 10 % indbygget padding
   -- derfor de to hoejder, samme optiske stoerrelse som paa forsiden. */
.sp-stores{ display:flex; align-items:center; gap:6px; }
.sp-stores img{ display:block; width:auto; height:32px; }
.sp-stores .gp img{ height:48px; }
@media (max-width:400px){
  .sp-logo span{ display:none; }
  .sp-stores img{ height:28px; }
  .sp-stores .gp img{ height:42px; }
}
.sp-logo{ display:inline-flex; align-items:center; gap:10px; font-size:17px; }
.sp-logo img{ display:block; border-radius:8px; }
.lead{ font-size:17px; margin-bottom:24px; }

/* Formular */
.sp-form{ display:grid; grid-template-columns:repeat(auto-fit, minmax(200px, 1fr)); gap:0 16px; }
.sp-form .field select{
  font:inherit; width:100%; padding:11px 12px; color:var(--text); background:var(--bg);
  border:1px solid var(--border); border-radius:9px;
}
.sp-form .field select:focus-visible,
.sp-form .field input:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.sp-custom{ grid-column:1 / -1; margin:0 0 16px; }
.sp-custom p{ font-size:14px; color:var(--text-dim); margin:0 0 8px; }
.sp-custom-grid{ display:grid; grid-template-columns:auto repeat(7, 1fr); gap:6px; align-items:center; }
.sp-custom-grid .wk{ font-size:13px; font-weight:600; color:var(--text-dim); padding-right:4px; }
.sp-custom-grid .day{
  font:inherit; font-size:12px; border:0; border-radius:8px; padding:6px 2px; cursor:pointer;
  color:var(--text); display:flex; flex-direction:column; align-items:center; min-height:44px; overflow:hidden;
}
.sp-custom-grid .day .wd{ font-weight:700; }
.sp-custom-grid .day .who{ max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sp-edit > summary{ cursor:pointer; font-weight:600; margin:0 0 14px; color:var(--accent); }

/* Farver */
.a, .day.a{ background:var(--pa); }
.b, .day.b{ background:var(--pb); }
.dot{ display:inline-block; width:12px; height:12px; border-radius:50%; margin-right:6px; vertical-align:-1px; }

/* Resultat */
.sp-legend{ list-style:none; padding:0; margin:0 0 14px; display:flex; flex-wrap:wrap; gap:8px 22px; font-size:15px; }
.sp-legend li{ margin:0; display:flex; align-items:center; }
.sp-legend .sw{ width:16px; height:16px; border-radius:4px; margin-right:8px; position:relative; }
.sp-legend .sw.chg{ background:var(--out); }
.sp-legend .sw.hol{ background:var(--out); }

.sp-actions{ display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin:0 0 18px; }
.btn{
  font:inherit; font-size:15px; font-weight:600; border-radius:999px; padding:10px 20px; cursor:pointer;
  border:1px solid var(--accent); background:var(--accent); color:var(--on-accent); text-decoration:none; display:inline-block;
}
.btn.ghost{ background:transparent; color:var(--accent); }
.btn:disabled{ opacity:.6; cursor:default; }
.sp-share-note{ font-size:13.5px; color:var(--text-dim); margin:0 0 18px; }
.sp-share-result{ display:flex; flex-wrap:wrap; gap:8px; margin:0 0 8px; }
.sp-share-result input{
  font:inherit; font-size:14px; flex:1 1 260px; padding:9px 12px; color:var(--text);
  background:var(--bg); border:1px solid var(--border); border-radius:9px;
}
#sp-share-status{ font-size:14px; color:var(--text-dim); min-height:1em; }

.sp-calendar{ display:grid; grid-template-columns:repeat(auto-fill, minmax(230px, 1fr)); gap:18px 22px; margin:8px 0 26px; }
.month h3{ margin:0 0 6px; font-size:15px; text-transform:capitalize; }
.month table{ width:100%; border-collapse:separate; border-spacing:2px; table-layout:fixed; }
.month th{ font-size:11.5px; font-weight:600; color:var(--text-dim); padding:2px 0; }
.month td{ text-align:center; font-size:13px; padding:5px 0; border-radius:5px; position:relative; font-variant-numeric:tabular-nums; }
.month td.out{ background:var(--out); color:var(--text-dim); }
.month td.empty{ background:none; }

/* Skiftedag: trekant i hjoernet. Helligdag: fed og understreget. */
.month td.chg::before, .sp-legend .sw.chg::before{
  content:""; position:absolute; top:0; left:0; border-style:solid; border-width:7px 7px 0 0;
  border-color:var(--text) transparent transparent transparent; border-top-left-radius:4px;
}
.month td.hol, .sp-legend .sw.hol{ font-weight:800; text-decoration:underline; text-underline-offset:2px; }
.sp-legend .sw.hol{ font-size:11px; text-align:center; line-height:16px; }

.sp-holidays{ width:100%; border-collapse:collapse; font-size:14.5px; margin:0 0 26px; }
.sp-holidays th, .sp-holidays td{ text-align:left; padding:6px 8px; border-bottom:1px solid var(--border); }
.sp-holidays th{ font-size:13px; color:var(--text-dim); }

.sp-cta{ display:flex; flex-wrap:wrap; gap:14px; align-items:center; justify-content:space-between; }
.sp-cta p{ margin:0; font-weight:600; flex:1 1 300px; }

.sp-links{ list-style:none; padding:0; display:flex; flex-wrap:wrap; gap:8px; }
.sp-links a{
  display:inline-block; border:1px solid var(--border); background:var(--bg); border-radius:999px;
  padding:6px 14px; text-decoration:none; font-size:14.5px;
}
.faq h3{ font-size:16px; }

.print-only{ display:none; }
.visually-hidden{
  position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden;
  clip:rect(0 0 0 0); white-space:nowrap; border:0;
}

@media print{
  @page{ size:A4 landscape; margin:9mm; }
  :root{ --pa:#f6c1d6; --pb:#bfe0f7; --out:#f0eee9; --text:#000; --text-dim:#444; --border:#ccc; --bg:#fff; }
  *{ -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  body{ background:#fff; color:#000; font-size:10pt; }
  .wrap.wide{ max-width:none; padding:0; }
  body > .wrap > *:not(#sp-result){ display:none !important; }
  #sp-result > *:not(.print-keep){ display:none !important; }
  .print-only{ display:block; }
  .sp-print-head{ display:flex; justify-content:space-between; align-items:baseline; gap:12px; margin:0 0 2mm; }
  .sp-print-head h2{ font-size:14pt; margin:0; padding:0; border:0; }
  .sp-print-head p{ margin:0; font-size:10pt; }
  .sp-legend{ font-size:9pt; margin:0 0 2mm; gap:2mm 6mm; }
  .sp-calendar{ grid-template-columns:repeat(4, 1fr); gap:3mm 6mm; margin:0; }
  .month{ break-inside:avoid; }
  .month h3{ font-size:9.5pt; margin:0 0 1mm; }
  .month table{ border-spacing:1px; }
  .month th{ font-size:7pt; padding:0; }
  .month td{ font-size:8pt; padding:.6mm 0; border-radius:2px; }
  .month td.chg::before{ border-width:5px 5px 0 0; }
  #sp-print-hol{ font-size:7.5pt; margin:2mm 0 0; color:#333; }
  .sp-print-foot{ font-size:7.5pt; margin:1mm 0 0; color:#555; }
}
