/* ReiseSIM Aufladeportal – neues Design (November 2026)
   Farben, Abstände und Komponenten für alle Seiten im neuen Design.
   Logische Eigenschaften (inline-start/end), damit Arabisch (RTL) automatisch passt. */

:root {
  --rs-bg: #eef4f8;
  --rs-surface: #ffffff;
  --rs-text: #1c2b3a;
  --rs-muted: #4a5b6c;
  --rs-muted-2: #56677a;
  --rs-line: #dbe5ec;
  --rs-line-strong: #c9d6e0;
  --rs-line-soft: #edf2f6;
  --rs-primary: #1d6f93;
  --rs-primary-dark: #175a78;
  --rs-navy: #284062;
  --rs-navy-text: #d4e6f0;
  --rs-accent: #7cc8e6;
  --rs-ok: #2f8f5b;
  --rs-ok-soft: #dcf1e5;
  --rs-error: #b42318;
  --rs-error-soft: #fdecea;
  --rs-warn-soft: #fff6db;
  --rs-paypal: #ffc439;
  --rs-paypal-dark: #f2b628;
  --rs-focus: 0 0 0 4px rgba(29, 111, 147, 0.22);
  --rs-shadow: 0 1px 2px rgba(28, 43, 58, 0.06), 0 8px 24px rgba(28, 43, 58, 0.06);
  --rs-radius: 16px;
  --rs-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.rs {
  margin: 0;
  min-height: 100vh;
  background: var(--rs-bg);
  color: var(--rs-text);
  font-family: var(--rs-font);
  font-size: 16px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}

.rs a { color: var(--rs-primary); }
.rs a:hover { color: var(--rs-navy); }
.rs h1, .rs h2, .rs h3, .rs p { margin: 0; }
.rs img { max-width: 100%; }
.rs :focus-visible { outline: none; box-shadow: var(--rs-focus); }
.rs [hidden] { display: none !important; }
.rs-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Kopfleiste ---------- */
.rs-top { background: var(--rs-navy); color: #fff; position: relative; z-index: 20; }
.rs-top-in {
  max-width: 1160px; margin: 0 auto; min-height: 64px;
  padding: 8px 12px 8px 20px; padding-inline: 20px 12px;
  display: flex; align-items: center; gap: 16px;
}
.rs-brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.rs .rs-brand, .rs .rs-brand:hover { color: #fff; }
.rs-brand img { display: block; height: 30px; width: auto; max-width: 100%; }
@media (max-width: 420px) { .rs-brand img { height: 24px; } }
.rs-nav { display: flex; gap: 4px; margin-inline-start: 12px; }
.rs-nav a {
  display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 8px;
  color: var(--rs-navy-text); font-size: 15px; font-weight: 500; text-decoration: none;
}
.rs .rs-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.rs .rs-nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, 0.14); font-weight: 600; }
.rs-top-end { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.rs-sim { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; color: var(--rs-navy-text); padding-inline-end: 4px; min-width: 0; }
.rs-sim-titel { font-size: 14px; font-weight: 600; color: #fff; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-sim-nr { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; letter-spacing: 0.02em; white-space: nowrap; }
.rs-menu-sim { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px 10px; }
.rs-menu-sim .rs-sim-titel { color: var(--rs-text); max-width: none; }
.rs-menu-sim .rs-sim-nr { color: var(--rs-muted-2); }
.rs .rs-logout { color: var(--rs-navy-text); font-size: 14px; text-decoration: none; padding: 0 8px; min-height: 44px; display: flex; align-items: center; }
.rs .rs-logout:hover { color: #fff; }

/* Aufklappmenüs (Sprache, Mobil-Menü) ohne JavaScript */
.rs-drop { position: relative; }
.rs-drop > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 44px; height: 44px; padding: 0 12px; border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.28); color: #fff; font-weight: 600; font-size: 14px;
}
.rs-drop > summary::-webkit-details-marker { display: none; }
.rs-drop[open] > summary { background: rgba(255, 255, 255, 0.12); }
.rs-drop-menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 8px); min-width: 200px;
  background: var(--rs-surface); color: var(--rs-text); border-radius: 12px; box-shadow: 0 12px 32px rgba(28, 43, 58, 0.22);
  padding: 6px; display: flex; flex-direction: column;
}
.rs .rs-drop-menu a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 0 12px;
  border-radius: 8px; color: var(--rs-text); text-decoration: none; font-size: 15px;
}
.rs .rs-drop-menu a:hover { background: var(--rs-bg); color: var(--rs-text); }
.rs .rs-drop-menu a[aria-current="true"] { font-weight: 700; color: var(--rs-primary); }
.rs-drop-menu hr { border: 0; border-top: 1px solid var(--rs-line); margin: 6px 4px; }
.rs-menu-btn { display: none; }
.rs-menu-btn > summary { border-color: transparent; padding: 0; width: 44px; }

@media (max-width: 860px) {
  .rs .rs-nav, .rs .rs-sim, .rs .rs-logout { display: none; }
  .rs-menu-btn { display: block; }
  .rs-top-in { min-height: 60px; gap: 8px; }
}

/* ---------- Seitenrahmen ---------- */
.rs-main { flex: 1 0 auto; }
.rs-wrap { max-width: 1160px; margin: 0 auto; padding: 28px 20px 48px; }
.rs-narrow { max-width: 480px; }
.rs-stack { display: flex; flex-direction: column; gap: 16px; }
.rs-card { background: var(--rs-surface); border-radius: var(--rs-radius); padding: 20px; box-shadow: var(--rs-shadow); }
.rs-title { font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
.rs-subtitle { font-size: 15px; color: var(--rs-muted); }
.rs-h2 { font-size: 18px; font-weight: 700; }
.rs-label-caps { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--rs-muted-2); }
.rs-small { font-size: 13px; line-height: 1.45; color: var(--rs-muted-2); }

/* ---------- Hinweise ---------- */
.rs-alert { border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.45; display: flex; gap: 10px; align-items: flex-start; }
.rs-alert svg { flex: none; margin-top: 1px; }
.rs-alert-error { background: var(--rs-error-soft); color: var(--rs-error); }
.rs-alert-info { background: var(--rs-warn-soft); color: #6b4e00; }
.rs-alert a { color: inherit; font-weight: 600; }

/* ---------- Buttons ---------- */
.rs-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 20px; border-radius: 12px; border: 0; cursor: pointer;
  font: 600 16px var(--rs-font); text-decoration: none; text-align: center; transition: background 0.15s, box-shadow 0.15s;
}
.rs .rs-btn-primary, .rs .rs-btn-primary:hover { color: #fff; }
.rs-btn-primary { background: var(--rs-primary); }
.rs-btn-primary:hover { background: var(--rs-primary-dark); }
.rs .rs-btn-paypal, .rs .rs-btn-paypal:hover { color: var(--rs-text); }
.rs-btn-paypal { background: var(--rs-paypal); font-weight: 700; }
.rs-btn-paypal:hover { background: var(--rs-paypal-dark); }
.rs .rs-btn-outline { background: var(--rs-surface); color: var(--rs-text); border: 1.5px solid var(--rs-line-strong); min-height: 44px; font-size: 15px; }
.rs .rs-btn-outline:hover { border-color: var(--rs-primary); color: var(--rs-primary); }
.rs .rs-btn-ghost { background: transparent; color: var(--rs-primary); min-height: 48px; }
.rs .rs-btn-ghost:hover { background: rgba(29, 111, 147, 0.08); }
.rs-btn-block { width: 100%; }
.rs-btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Formulare ---------- */
.rs-field { display: flex; flex-direction: column; gap: 8px; }
.rs-field label, .rs-label { font-size: 14px; font-weight: 600; }
.rs-input {
  width: 100%; height: 52px; padding: 0 16px; border: 1.5px solid var(--rs-line-strong); border-radius: 12px;
  background: var(--rs-surface); color: var(--rs-text); font: 500 17px var(--rs-font);
}
.rs-input::placeholder { color: #8a9aa9; font-weight: 400; }
.rs-input:focus { outline: none; border-color: var(--rs-primary); box-shadow: var(--rs-focus); }
.rs-input-code { letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }
.rs-search { position: relative; }
.rs-search svg { position: absolute; inset-inline-start: 14px; top: 16px; pointer-events: none; }
.rs-search .rs-input { padding-inline-start: 44px; }

/* Segment-Umschalter (Login-Reiter, Länder/Regionen) */
.rs-seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; background: var(--rs-bg); border-radius: 12px; }
.rs-seg button, .rs-seg a {
  min-height: 44px; border: 0; border-radius: 9px; background: transparent; color: var(--rs-muted);
  font: 500 14px var(--rs-font); cursor: pointer; display: flex; align-items: center; justify-content: center; text-decoration: none; padding: 0 8px;
}
.rs .rs-seg [aria-selected="true"], .rs .rs-seg [aria-current="true"] { background: var(--rs-surface); color: var(--rs-text); font-weight: 600; box-shadow: 0 1px 3px rgba(28, 43, 58, 0.12); }

/* ---------- Schrittanzeige ---------- */
.rs-steps { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--rs-muted-2); list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.rs-steps li { display: flex; align-items: center; gap: 8px; }
.rs-steps li + li::before { content: ""; width: 20px; height: 2px; background: var(--rs-line-strong); }
.rs-step-num { width: 24px; height: 24px; border-radius: 12px; background: var(--rs-line); color: var(--rs-muted); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.rs-steps [aria-current="step"] { color: var(--rs-text); }
.rs-steps [aria-current="step"] .rs-step-num { background: var(--rs-primary); color: #fff; }
.rs-steps .rs-done .rs-step-num { background: var(--rs-ok); color: #fff; }

/* ---------- Länderauswahl ---------- */
.rs-list { background: var(--rs-surface); border-radius: 14px; box-shadow: 0 1px 2px rgba(28, 43, 58, 0.06); overflow: hidden; margin: 0; padding: 0; list-style: none; }
.rs-list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.rs-country {
  width: 100%; display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 0 16px;
  background: transparent; border: 0; border-bottom: 1px solid var(--rs-line-soft); cursor: pointer;
  font: 500 16px var(--rs-font); color: var(--rs-text); text-align: start;
}
.rs-country:hover { background: #f6f9fb; }
.rs-flag { width: 34px; height: 24px; border-radius: 4px; object-fit: cover; box-shadow: 0 0 0 1px rgba(28, 43, 58, 0.1); flex: none; background: var(--rs-line-soft); }
.rs-country-from { margin-inline-start: auto; font-size: 13px; color: var(--rs-muted-2); white-space: nowrap; }
.rs-chevron { flex: none; color: #8a9aa9; }
[dir="rtl"] .rs-chevron { transform: scaleX(-1); }
.rs-more > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; border-radius: 12px; border: 1.5px solid var(--rs-line-strong); background: var(--rs-surface);
  font-weight: 600; color: var(--rs-text);
}
.rs-more > summary::-webkit-details-marker { display: none; }
.rs-more[open] > summary { margin-bottom: 12px; }
.rs-empty { text-align: center; color: var(--rs-muted); padding: 16px; }

/* ---------- Paketauswahl + Bestellung ---------- */
.rs-shop { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
@media (min-width: 900px) {
  .rs-shop { grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; }
  .rs-order { position: sticky; top: 24px; }
}
.rs-land-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.rs-land-head .rs-flag { width: 54px; height: 38px; border-radius: 6px; }
.rs-land-head .rs-btn-outline { margin-inline-start: auto; }
.rs-pkgs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .rs-pkgs { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; } }
.rs-pkg { position: relative; display: block; cursor: pointer; }
.rs-pkg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.rs-pkg-box {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 124px; height: 100%;
  padding: 14px; border-radius: 14px; background: var(--rs-surface); border: 2px solid var(--rs-line);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.rs-pkg:hover .rs-pkg-box { border-color: var(--rs-line-strong); }
.rs-pkg input:checked + .rs-pkg-box { border-color: var(--rs-primary); box-shadow: 0 0 0 4px rgba(29, 111, 147, 0.15); }
.rs-pkg input:focus-visible + .rs-pkg-box { box-shadow: var(--rs-focus); }
.rs-pkg-gb { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; }
.rs-pkg-days, .rs-pkg-per { font-size: 13px; color: var(--rs-muted-2); }
.rs-pkg-price { margin-top: 8px; font-size: 18px; font-weight: 700; color: var(--rs-primary); }
@media (min-width: 640px) { .rs-pkg-gb { font-size: 26px; } .rs-pkg-price { font-size: 20px; } .rs-pkg-box { min-height: 148px; padding: 18px; } }

.rs-order { display: flex; flex-direction: column; gap: 12px; }
.rs-order-row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.rs-order-row span:first-child { color: var(--rs-muted-2); }
.rs-order-row span:last-child { font-weight: 600; text-align: end; }
.rs-order-total { display: flex; justify-content: space-between; align-items: baseline; }
.rs-order-total strong { font-size: 26px; }
.rs-divider { height: 1px; background: var(--rs-line-soft); border: 0; margin: 0; }
.rs-pay { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }

/* Handy: Bestellung als feste Leiste unten */
@media (max-width: 899px) {
  .rs-order {
    position: sticky; bottom: 0; margin: 0 -20px -48px; border-radius: 0; padding: 14px 20px calc(16px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 24px rgba(28, 43, 58, 0.08); border-top: 1px solid var(--rs-line); gap: 10px;
  }
  .rs-order .rs-order-hide-sm { display: none; }
  .rs-order-total strong { font-size: 20px; }
  .rs-pay { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rs-pay .rs-btn { padding: 0 10px; font-size: 15px; }
  .rs-pay-long { display: none; }
}
@media (min-width: 900px) { .rs-pay-short { display: none; } }

/* ---------- Ergebnis (Erfolg/Fehler/Abbruch) ---------- */
.rs-result { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.rs-result-icon { width: 72px; height: 72px; border-radius: 36px; display: flex; align-items: center; justify-content: center; }
.rs-result-ok { background: var(--rs-ok-soft); color: var(--rs-ok); }
.rs-result-bad { background: var(--rs-error-soft); color: var(--rs-error); }
.rs-result-neutral { background: var(--rs-line); color: var(--rs-muted); }
.rs-progress { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rs-progress li { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.rs-dot { width: 22px; height: 22px; border-radius: 11px; flex: none; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
.rs-dot-done { background: var(--rs-ok); color: #fff; }
.rs-dot-now { border: 2.5px solid var(--rs-primary); }
.rs-dot-next { border: 2px solid var(--rs-line-strong); }
.rs-progress .rs-later { color: var(--rs-muted-2); }

/* ---------- Datennutzung ---------- */
.rs-usage { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.rs-usage-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.rs-badge { display: inline-flex; align-items: center; min-height: 26px; padding: 0 10px; border-radius: 13px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.rs-badge-ok { background: var(--rs-ok-soft); color: #1f6b42; }
.rs-badge-off { background: var(--rs-line-soft); color: var(--rs-muted); }
.rs-bar { height: 10px; border-radius: 5px; background: var(--rs-line-soft); overflow: hidden; }
.rs-bar > span { display: block; height: 100%; border-radius: 5px; background: var(--rs-primary); }
.rs-usage-off { opacity: 0.75; }

/* Ansicht umschalten: Kacheln / Liste */
.rs-view { display: inline-grid; }
.rs-view button { gap: 6px; padding: 0 14px; }
.rs .rs-view [aria-pressed="true"] { background: var(--rs-surface); color: var(--rs-text); font-weight: 600; box-shadow: 0 1px 3px rgba(28, 43, 58, 0.12); }
.rs .rs-view { background: #e1eaf1; }
.rs-usage-liste { display: flex; flex-direction: column; gap: 0; background: var(--rs-surface); border-radius: var(--rs-radius); box-shadow: var(--rs-shadow); overflow: hidden; }
.rs-usage-liste > .rs-card {
  box-shadow: none; border-radius: 0; border-bottom: 1px solid var(--rs-line-soft); padding: 14px 20px;
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: 20px; align-items: center;
}
.rs-usage-liste > .rs-card:last-child { border-bottom: 0; }
.rs-usage-liste .rs-usage-head { justify-content: flex-start; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.rs-usage-liste .rs-h2 { font-size: 16px !important; }
.rs-usage-liste .rs-small { text-align: end; }
@media (max-width: 760px) {
  .rs-usage-liste > .rs-card { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 14px 16px; }
  .rs-usage-liste .rs-small { text-align: start; }
}

/* ---------- SIM-Auswahl ---------- */
.rs-sims { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.rs-sim-card { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.rs-sim-aktuell { box-shadow: 0 0 0 2px var(--rs-primary), var(--rs-shadow); }
.rs-sim-info { display: flex; gap: 14px; align-items: flex-start; flex: 1 1 280px; min-width: 0; }
.rs-sim-icon { width: 44px; height: 44px; border-radius: 12px; background: #e3f0f6; color: var(--rs-primary); display: flex; align-items: center; justify-content: center; flex: none; }
.rs-sim-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.rs-sim-name { display: flex; align-items: center; gap: 4px; min-height: 44px; }
.rs-sim-label { font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.rs-sim-label-leer { font-weight: 600; }
.rs-sim-iccid { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--rs-muted-2); overflow-wrap: anywhere; }
.rs-sim-form { display: flex; flex-direction: column; gap: 8px; margin: 4px 0; }
.rs-sim-form-actions { display: flex; gap: 8px; }
.rs-sim-form-actions .rs-btn { min-height: 44px; font-size: 15px; }
.rs-sim-status { color: var(--rs-error); }
.rs-sim-status:empty { display: none; }
.rs-sim-actions { display: flex; gap: 10px; flex: 0 1 auto; }
.rs-sim-actions .rs-btn { min-height: 48px; }
@media (max-width: 640px) {
  .rs-sim-actions { flex: 1 1 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.rs-icon-btn { width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--rs-muted-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.rs-icon-btn:hover { background: var(--rs-bg); color: var(--rs-primary); }
.rs-alert-ok { background: var(--rs-ok-soft); color: #1f6b42; }

/* ---------- Login ---------- */
.rs-login { max-width: 440px; margin: 0 auto; padding: 32px 20px 40px; display: flex; flex-direction: column; gap: 20px; }
.rs-panel[hidden] { display: none; }
.rs-stores { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.rs-stores img { height: 40px; width: auto; display: block; }

/* Dialog (PLZ-Abfrage) */
.rs-overlay { position: fixed; inset: 0; background: rgba(20, 32, 52, 0.6); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 100; }
.rs-overlay[hidden] { display: none; }
.rs-dialog { background: var(--rs-surface); border-radius: 20px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3); padding: 24px; width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 14px; }
.rs-code-chip { align-self: flex-start; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: #eef6fa; color: var(--rs-navy); border-radius: 8px; padding: 4px 10px; font-size: 15px; }
.rs-dialog-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rs .rs-btn-soft { background: var(--rs-bg); color: var(--rs-muted); }

/* ---------- Fußzeile ---------- */
.rs-foot { text-align: center; font-size: 14px; color: var(--rs-muted); padding: 8px 20px 28px; }

@media (prefers-reduced-motion: reduce) { .rs * { transition: none !important; } }
