/* ═══════════════════════════════════════════════════════════════════════
 * HARAMAIN COMPANION — Subscription UI v1.0 CSS
 * Datum: 06.05.2026
 * Prefix: hcsub-
 * ═══════════════════════════════════════════════════════════════════════ */

.hcsub-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  font-family: inherit;
}

.hcsub-modal.is-open {
  display: block;
}

.hcsub-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.hcsub-sheet {
  position: absolute;
  inset: 0;
  background: #0a130f;
  color: #e8efea;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: hcsub-fade-in 0.25s ease-out;
}

@keyframes hcsub-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Header ──────────────────────────────────────────────────────────── */
.hcsub-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top));
  background: #0d1814;
  border-bottom: 1px solid rgba(201, 161, 74, 0.12);
  position: sticky;
  top: 0;
  z-index: 1;
}

.hcsub-back {
  background: none;
  border: none;
  color: #c9a14a;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: background 0.15s;
  padding: 0;
}

.hcsub-back:hover { background: rgba(201, 161, 74, 0.1); }
.hcsub-back:active { background: rgba(201, 161, 74, 0.2); }

.hcsub-title {
  flex: 1;
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  color: #c9a14a;
  letter-spacing: 0.2px;
}

.hcsub-spacer { width: 40px; }

[dir="rtl"] .hcsub-back svg { transform: scaleX(-1); }

/* ─── Body ────────────────────────────────────────────────────────────── */
.hcsub-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 16px;
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
}

/* ─── Cards ───────────────────────────────────────────────────────────── */
.hcsub-card {
  background: #0d1814;
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.hcsub-card--active { border-color: rgba(20, 148, 106, 0.3); }
.hcsub-card--free   { border-color: rgba(201, 161, 74, 0.3); }

.hcsub-emoji {
  font-size: 48px;
  margin-bottom: 12px;
  line-height: 1;
}

.hcsub-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
  color: #fff;
  font-weight: 600;
}

.hcsub-sub {
  margin: 0;
  color: #9ba8a0;
  font-size: 14px;
  line-height: 1.5;
}

/* ─── List ────────────────────────────────────────────────────────────── */
.hcsub-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  text-align: start;
}

.hcsub-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  gap: 12px;
}

.hcsub-list li:last-child { border-bottom: none; }

.hcsub-list span {
  color: #9ba8a0;
  font-size: 14px;
}

.hcsub-list strong {
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  text-align: end;
}

/* ─── Banner ──────────────────────────────────────────────────────────── */
.hcsub-banner {
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.4;
}

.hcsub-banner--warn {
  background: rgba(255, 193, 7, 0.08);
  border: 1px solid rgba(255, 193, 7, 0.25);
  color: #ffd54f;
}

.hcsub-banner strong {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}

/* ─── Actions ─────────────────────────────────────────────────────────── */
.hcsub-actions {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hcsub-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  font-family: inherit;
  text-align: center;
}

.hcsub-btn:active { transform: scale(0.98); }

.hcsub-btn--primary {
  background: #c9a14a;
  color: #0a130f;
}

.hcsub-btn--primary:hover:not(:disabled) { background: #d4af5a; }

.hcsub-btn--primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.hcsub-btn--secondary {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.hcsub-btn--secondary:hover { background: rgba(255, 255, 255, 0.1); }

.hcsub-hint {
  text-align: center;
  color: #9ba8a0;
  font-size: 13px;
  margin: 8px 0 0;
  line-height: 1.5;
}

/* ─── States (loading / error) ────────────────────────────────────────── */
.hcsub-state {
  text-align: center;
  padding: 60px 20px;
  color: #9ba8a0;
}

.hcsub-state .hcsub-emoji { font-size: 40px; }

.hcsub-state p {
  margin: 12px 0 0;
  font-size: 15px;
}

.hcsub-spinner {
  width: 32px;
  height: 32px;
  margin: 0 auto;
  border: 3px solid rgba(201, 161, 74, 0.18);
  border-top-color: #c9a14a;
  border-radius: 50%;
  animation: hcsub-spin 0.8s linear infinite;
}

@keyframes hcsub-spin {
  to { transform: rotate(360deg); }
}

/* ─── Body scroll lock ────────────────────────────────────────────────── */
body.hcsub-locked {
  overflow: hidden;
  -webkit-overflow-scrolling: auto;
}

/* ═══════════════════════════════════════════════════════════════════════
 * Heller Modus (data-light auf <html> oder <body>)
 * ═══════════════════════════════════════════════════════════════════════ */

html[data-light] .hcsub-sheet,
[data-light] .hcsub-sheet {
  background: #fafaf7;
  color: #1a1a1a;
}

html[data-light] .hcsub-header,
[data-light] .hcsub-header {
  background: #ffffff;
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

html[data-light] .hcsub-card,
[data-light] .hcsub-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

html[data-light] .hcsub-card h3,
[data-light] .hcsub-card h3 {
  color: #1a1a1a;
}

html[data-light] .hcsub-sub,
[data-light] .hcsub-sub,
html[data-light] .hcsub-list span,
[data-light] .hcsub-list span,
html[data-light] .hcsub-state,
[data-light] .hcsub-state,
html[data-light] .hcsub-hint,
[data-light] .hcsub-hint {
  color: #5a6660;
}

html[data-light] .hcsub-list strong,
[data-light] .hcsub-list strong {
  color: #1a1a1a;
}

html[data-light] .hcsub-list li,
[data-light] .hcsub-list li {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

html[data-light] .hcsub-btn--secondary,
[data-light] .hcsub-btn--secondary {
  background: rgba(0, 0, 0, 0.05);
  color: #1a1a1a;
}

html[data-light] .hcsub-btn--secondary:hover,
[data-light] .hcsub-btn--secondary:hover {
  background: rgba(0, 0, 0, 0.08);
}

html[data-light] .hcsub-banner--warn,
[data-light] .hcsub-banner--warn {
  background: rgba(255, 193, 7, 0.12);
  color: #8c6a00;
}
