/* abo.css */
:root{
  --font: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --bg:#f7f9fc; --fg:#111; --muted:#555;
  --brand:#6a9d39; --brand-700:#4f7a2b;
  --border:#cfd6df;
  --danger:#b3261e;
  color-scheme: light;
}

*{ box-sizing:border-box; }
[hidden]{ display:none !important; }

html,body{ margin:0; padding:0; font-family:var(--font); background:var(--bg); color:var(--fg); }

.abo-main{ padding: 18px 14px 28px; }
.abo-wrap{ max-width: 1080px; margin: 0 auto; display:flex; flex-direction:column; gap:14px; }

.abo-card{
  background:#fff;
  border:1px solid var(--border);
  padding:16px;
}

.abo-title{ margin:0 0 6px; font-size: 1.55rem; }
.abo-sub{ margin:0; color:var(--muted); line-height:1.45; }

.abo-h2{ margin:0 0 10px; font-size:1.15rem; }
.abo-h3{ margin:0; font-size:1rem; }

.abo-row{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.abo-pill{
  border:1px solid var(--border);
  padding:6px 10px;
  font-size:.92rem;
  color:#111;
  background:#fff;
  white-space:nowrap;
  display:inline-flex;
  align-items:center;
  gap:8px;
}

/* Status Pill Farben */
.abo-pill--ok{ border-color:#6a9d39; background:#eef7e7; }
.abo-pill--warn{ border-color:#d1a700; background:#fff6d6; }
.abo-pill--bad{ border-color:#b3261e; background:#ffe9ed; }
.abo-pill--neutral{ border-color:var(--border); background:#fff; }

.abo-grid{
  display:grid;
  grid-template-columns: 1.25fr 1fr;
  gap:14px;
  align-items:start;
}

/* Subscribe: E-Mail links, Kategorien rechts */
.abo-grid--subscribe{
  grid-template-columns: 1fr 1.25fr;
}

.abo-col{ display:flex; flex-direction:column; gap:8px; }

.abo-section-head{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  margin-bottom:6px;
}

.abo-section-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.abo-label{ font-weight:700; margin-top:2px; }

.abo-input{
  width:100%;
  border:1px solid var(--border);
  border-radius:0;
  padding:10px 10px;
  font-size: 1rem;
  background:#fff;
  color:#111;
}
.abo-input:disabled{ background:#f3f5f8; color:#666; }

.abo-divider{
  height:1px;
  background: var(--border);
  margin: 6px 0;
}

.abo-hint{
  border:1px solid #ffd0d8;
  background:#ffe9ed;
  color:#7c0013;
  padding:8px 10px;
  font-size:.95rem;
}

.abo-mini{
  border:1px solid var(--border);
  background:#fff;
  padding:10px 10px;
  font-size:.98rem;
  line-height:1.35;
}
.abo-mini b{ font-weight:800; }
.abo-mini .muted{ color:var(--muted); }

.abo-mini--ok{ border-color:#6a9d39; background:#eef7e7; }
.abo-mini--warn{ border-color:#d1a700; background:#fff6d6; }
.abo-mini--bad{ border-color:#b3261e; background:#ffe9ed; }

.abo-note{ margin:6px 0 0; color:var(--muted); font-size:.95rem; }

.abo-link{
  border:0; background:transparent; color:var(--brand-700);
  padding:0; cursor:pointer; font:inherit; text-decoration:underline;
}
.abo-link:focus-visible{ outline:2px solid var(--brand); outline-offset:2px; }

.abo-actions{ display:flex; gap:10px; flex-wrap:wrap; margin-top:6px; }
.abo-actions--spread{ justify-content:space-between; }

.abo-btn{
  border:1px solid var(--border);
  background:#fff;
  color:#111;
  padding:10px 12px;
  border-radius:0;
  cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
  text-decoration:none;
}
.abo-btn:hover{ background:#f3f5f8; }
.abo-btn:disabled{ opacity:.6; cursor:not-allowed; }
.abo-btn:focus-visible{ outline:2px solid var(--brand); outline-offset:2px; }

.abo-btn--ghost{ background:#fff; }
.abo-btn--danger{
  background: var(--danger);
  border-color: var(--danger);
  color:#fff;
}
.abo-btn--danger:hover{ filter:brightness(.95); }

.abo-alert{
  border:1px solid var(--border);
  background:#fff;
  padding:10px 12px;
  font-size:.98rem;
}

.abo-catgrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}

.abo-cat{
  border:1px solid var(--border);
  padding:10px;
  display:flex;
  gap:10px;
  align-items:flex-start;
  background:#fff;
}
.abo-cat input{ width:16px; height:16px; margin-top:2px; }
.abo-cat .t{ font-weight:800; margin:0; }
.abo-cat .d{ margin:2px 0 0; color:var(--muted); font-size:.95rem; }

.abo-resend{
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid var(--border);
}

/* Loading (Confirm) */
.abo-loading{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 10px;
  border:1px solid var(--border);
  background:#fff;
}
.abo-spinner{
  width:18px; height:18px;
  border:2px solid var(--border);
  border-top-color: var(--brand);
  border-radius:50%;
  animation: aboSpin 0.9s linear infinite;
}
@keyframes aboSpin{ to{ transform: rotate(360deg); } }
.abo-loading-text{ color: var(--muted); }

/* Modal */
.abo-modal-overlay{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.45);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
  z-index: 99999;
}
.abo-modal{
  width: min(520px, 92vw);
  background:#fff;
  border:1px solid var(--border);
  padding:14px;
}
.abo-modal-title{ margin:0 0 6px; font-size:1.05rem; }
.abo-modal-text{ margin:0; color:var(--muted); }
.abo-modal-actions{
  margin-top:12px;
  display:flex;
  gap:10px;
  justify-content:flex-end;
  flex-wrap:wrap;
}

/* Panel (Ausklappen) */
.abo-panel{
  border:1px solid var(--border);
  background:#fff;
  padding:10px;
}

/* Info Icon Button + Popover */
.abo-iconbtn{
  border:1px solid var(--border);
  background:#fff;
  color:#111;
  padding:6px 10px;
  border-radius:0;
  cursor:pointer;
  line-height:1;
  font-weight:800;
  min-height: 34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.abo-iconbtn:hover{ background:#f3f5f8; }
.abo-iconbtn:focus-visible{ outline:2px solid var(--brand); outline-offset:2px; }

.abo-pop{
  border:1px solid var(--border);
  background:#fff;
  padding:10px;
  font-size:.95rem;
  line-height:1.35;
  margin-top:8px;
}
.abo-pop-title{
  font-weight:800;
  margin:0 0 4px;
}
.abo-pop-text{
  color:var(--muted);
}

/* Kategorien-Gruppierung (gerendert durch JS) */
.abo-catgroup{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.abo-catgroup + .abo-catgroup{
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid var(--border);
}

.abo-catgroup-title{
  font-weight:800;
  margin:0;
  font-size:1rem;
  line-height:1.2;
}

/* Responsive */
@media (max-width: 980px){
  .abo-grid{ grid-template-columns:1fr; }
  .abo-grid--subscribe{ grid-template-columns:1fr; }
  .abo-catgrid{ grid-template-columns:1fr; }
}
