/* ════════════════════════════════════════════════════════════════════════
   HAJJ-TYPES — CSS (Phase 1)
   ────────────────────────────────────────────────────────────────────────
   v1.0 · 02.05.2026
   
   Eigenes Prefix .hct-* (nicht .hcj-*) damit es keine Konflikte gibt.
   Übernimmt aber Farben/Schriften aus hajj-v2.css für visuelle Kontinuität.
   
   STRUKTUR:
     .hct-modal          — Container (wenn separates Modal)
     .hct-screen         — Phone-Frame
     .hct-types-intro    — Auswahl-Screen-Container
     .hct-type-card      — Eine der 3 Karten
     .hct-detail-*       — Detail-Screen-Klassen
     .hct-madhahib-*     — Akkordeon (eigenes Prefix, parallel zu .hcj-madhahib)
   ════════════════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════════════════
   PHASE 3 — MODAL CONTAINER (1:1 Pattern von hcj-modal mit hct-* Prefix)
   ──────────────────────────────────────────────────────────────────────────
   v3.0 · 03.05.2026 — Live-Integration (Phase 3)
   
   Eigenes Modal parallel zu hcj-modal — KEIN Hijacking.
   Slide-Up von unten, gleicher Kaaba-Background wie Hajj-Plan-Modal.
   ══════════════════════════════════════════════════════════════════════════ */

/* ── MODAL CONTAINER ─────────────────────────────────────────────────────── */
#hct-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 11002;  /* Phase 4a-fix: über hc-settings-modal (11000) + hc-settings-picker (11001) */
  -webkit-font-smoothing: antialiased;
}
.hct-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 240ms ease-out;
  cursor: pointer;
}
.hct-modal--open .hct-overlay { opacity: 1; }

/* ── SCREEN (Slide-Up) ───────────────────────────────────────────────────── */
.hct-screen {
  position: absolute;
  inset: 0;
  margin: 0 auto;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  /* Kaaba bei Nacht — identisch zu .hcj-screen */
  background:
    linear-gradient(180deg, rgba(8,12,18,0.55) 0%, rgba(15,15,12,0.45) 50%, rgba(15,12,8,0.7) 100%),
    radial-gradient(circle at 15% 5%, rgba(255,255,255,0.7) 0%, transparent 0.3%),
    radial-gradient(circle at 35% 8%, rgba(255,255,255,0.5) 0%, transparent 0.2%),
    radial-gradient(circle at 55% 4%, rgba(255,255,255,0.6) 0%, transparent 0.3%),
    radial-gradient(circle at 75% 9%, rgba(255,255,255,0.4) 0%, transparent 0.2%),
    radial-gradient(circle at 88% 3%, rgba(255,255,255,0.7) 0%, transparent 0.3%),
    radial-gradient(circle at 25% 14%, rgba(255,255,255,0.4) 0%, transparent 0.2%),
    radial-gradient(circle at 65% 12%, rgba(255,255,255,0.5) 0%, transparent 0.2%),
    radial-gradient(ellipse at 50% 75%, rgba(232,180,90,0.5) 0%, rgba(180,130,60,0.3) 25%, transparent 55%),
    radial-gradient(ellipse at 30% 70%, rgba(220,180,120,0.25) 0%, transparent 35%),
    radial-gradient(ellipse at 70% 70%, rgba(220,180,120,0.25) 0%, transparent 35%),
    linear-gradient(180deg, #050810 0%, #0a1018 25%, #1a1815 50%, #3a2818 70%, #4a3018 85%, #1a1410 100%);
  background-size: cover;
  color: #f0f4f1;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  transform: translateY(100%);
  transition: transform 280ms cubic-bezier(0.32, 0.72, 0, 1);
  overflow: hidden;
  scroll-behavior: auto; /* per Briefing: NIE smooth */
}
.hct-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 480 800' preserveAspectRatio='xMidYMax slice'%3E%3Cpath d='M0 660 L0 620 Q40 605 120 605 L160 590 L200 605 Q240 605 280 605 Q320 605 360 590 L400 605 Q440 605 480 620 L480 660 Z' fill='rgba(20,15,10,0.55)'/%3E%3Cpath d='M0 720 Q120 700 240 695 Q360 700 480 720 L480 800 L0 800 Z' fill='rgba(0,0,0,0.65)'/%3E%3C/svg%3E");
  background-size: 100% auto;
  background-position: center bottom;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
  transition: opacity 240ms ease;
}
html[data-hc-bg="off"] .hct-screen::before { opacity: 0; }
.hct-screen > * {
  position: relative;
  z-index: 1;
}
.hct-modal--open .hct-screen { transform: translateY(0); }

/* ── MODAL HEADER (Close-Button) ─────────────────────────────────────────── */
.hct-modal-hdr {
  flex-shrink: 0;
  padding: 8px 12px;
  padding-top: max(8px, env(safe-area-inset-top, 8px));
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 44px;
}
.hct-modal-close {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 160ms ease, transform 160ms ease;
  -webkit-tap-highlight-color: transparent;
}
.hct-modal-close:hover { background: rgba(255,255,255,0.14); }
.hct-modal-close:active { transform: scale(0.94); }
.hct-modal-close svg {
  width: 22px;
  height: 22px;
  stroke-linecap: round;
}

/* ── CANVAS (scrollbarer Inhalt) ─────────────────────────────────────────── */
.hct-canvas {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: auto; /* per Briefing: NIE smooth */
  padding-bottom: max(20px, env(safe-area-inset-bottom, 20px));
}


/* ── AUSWAHL-SCREEN ──────────────────────────────────────────────────── */
.hct-types-intro {
  padding: 14px 18px 18px;
}
.hct-types-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #c9a14a;
  margin-bottom: 4px;
}
.hct-types-title {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}
.hct-types-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 14px;
  line-height: 1.5;
}
.hct-types-source {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(201,161,74,0.1);
  color: #c9a14a;
  border: 1px solid rgba(201,161,74,0.2);
  margin-bottom: 16px;
}

/* ── 3-ARTEN-KARTEN ──────────────────────────────────────────────────── */
.hct-type-card {
  position: relative;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-left: 3px solid #c9a14a;
  border-radius: 14px;
  padding: 16px 16px 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 200ms ease;
  overflow: hidden;
}
.hct-type-card:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-1px);
}
.hct-type-card.recommended {
  background: linear-gradient(135deg, rgba(201,161,74,0.15) 0%, rgba(45,212,191,0.08) 100%);
  border-left: 3px solid #c9a14a;
  border-color: rgba(201,161,74,0.35);
  box-shadow: 0 8px 24px -8px rgba(201,161,74,0.3);
}
.hct-type-recommended-badge {
  position: absolute;
  top: 0; right: 0;
  background: rgba(201,161,74,0.95);
  color: #1a1410;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-bottom-left-radius: 12px;
}
.hct-type-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
  margin-top: 8px;
}
.hct-type-name-de {
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.01em;
}
.hct-type-name-ar {
  font-family: 'Amiri', serif;
  font-size: 18px;
  font-weight: 700;
  color: #c9a14a;
}
.hct-type-arrow {
  margin-left: auto;
  color: rgba(255,255,255,0.4);
  font-size: 22px;
  line-height: 1;
}
.hct-type-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  font-style: italic;
  margin-bottom: 12px;
}
.hct-type-steps {
  border-top: 1px dashed rgba(255,255,255,0.1);
  padding-top: 10px;
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(255,255,255,0.85);
}
.hct-type-step-num {
  display: inline-block;
  width: 18px; height: 18px;
  line-height: 18px;
  text-align: center;
  background: rgba(45,212,191,0.18);
  color: #2dd4bf;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  margin-right: 6px;
  vertical-align: middle;
}
.hct-type-pills {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.hct-type-pill {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.85);
  font-size: 10.5px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
}
.hct-type-pill.gold {
  background: rgba(201,161,74,0.15);
  color: #c9a14a;
  border-color: rgba(201,161,74,0.3);
}
.hct-type-pill.red {
  background: rgba(239,68,68,0.12);
  color: #fca5a5;
  border-color: rgba(239,68,68,0.3);
}
.hct-types-hint {
  margin-top: 14px;
  background: rgba(45,212,191,0.08);
  border: 1px solid rgba(45,212,191,0.2);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(255,255,255,0.85);
}
.hct-types-hint b { color: #2dd4bf; font-weight: 700; }

/* ── DETAIL-SCREEN ───────────────────────────────────────────────────── */
.hct-detail-hero {
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.hct-detail-hero-name {
  font-size: 28px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 4px;
}
.hct-detail-hero-ar {
  font-family: 'Amiri', serif;
  font-size: 26px;
  color: #c9a14a;
  font-weight: 700;
  margin-right: 12px;
}
.hct-detail-hero-meaning {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  font-style: italic;
  margin-top: 6px;
}
.hct-detail-content {
  padding: 14px 18px 24px;
}
.hct-section-title {
  font-size: 13px;
  color: #c9a14a;
  margin: 18px 0 8px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}

/* ── BLOCK (Hadith/Quran/Buch — analog zu .hcj-blk) ──────────────────── */
.hct-blk {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-left: 3px solid #c9a14a;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.hct-blk[data-type="fiqh"] { border-left-color: #4ade80; }
.hct-blk-row {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 10px;
  align-items: start;
}
.hct-blk-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.3;
}
.hct-blk-meta-label {
  font-size: 9.5px;
  margin-bottom: 2px;
  color: #c9a14a;
}
.hct-blk-meta-ref {
  opacity: 0.55;
  font-weight: 500;
  color: #fff;
}
.hct-blk-arabic {
  font-family: 'Amiri', 'Scheherazade New', serif;
  font-size: 18px;
  line-height: 1.85;
  direction: rtl;
  font-weight: 700;
  margin-bottom: 4px;
  text-align: right;
  color: #f0f4f1;
}
.hct-blk-text {
  font-size: 12.5px;
  line-height: 1.55;
  margin-bottom: 6px;
  color: rgba(255,255,255,0.92);
}
.hct-blk-source {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(201,161,74,0.1);
  color: #c9a14a;
  border: 1px solid rgba(201,161,74,0.2);
  text-decoration: none;
}

/* ── ABLAUF-LISTE ────────────────────────────────────────────────────── */
.hct-detail-step {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 6px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.hct-detail-step-num {
  flex-shrink: 0;
  background: rgba(45,212,191,0.18);
  color: #2dd4bf;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
}
.hct-detail-step-text {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,255,255,0.92);
}

/* ── MADHĀHIB-AKKORDEON (eigenes Prefix .hct-mdh-*) ─────────────────── */
.hct-mdh {
  margin-top: 24px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(167,139,250,0.08), rgba(167,139,250,0.02));
  border: 1px solid rgba(167,139,250,0.25);
  border-radius: 14px;
}
.hct-mdh-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.hct-mdh-icon { font-size: 18px; }
.hct-mdh-title {
  font-size: 13px;
  font-weight: 700;
  color: #a78bfa;
}
.hct-mdh-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
  margin-bottom: 14px;
  font-style: italic;
}
.hct-mdh-block {
  margin-bottom: 8px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 200ms ease;
}
.hct-mdh-block.open {
  border-color: rgba(167,139,250,0.35);
}
.hct-mdh-block-hdr {
  width: 100%;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(167,139,250,0.14);
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  text-align: left;
  transition: background 160ms ease;
}
.hct-mdh-block-hdr:hover {
  background: rgba(167,139,250,0.22);
}
.hct-mdh-block.open .hct-mdh-block-hdr {
  background: rgba(167,139,250,0.22);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.hct-mdh-block-icon { font-size: 18px; flex-shrink: 0; }
.hct-mdh-block-title {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}
.hct-mdh-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: rgba(167,139,250,0.7);
  transition: transform 240ms ease;
}
.hct-mdh-block.open .hct-mdh-chevron {
  transform: rotate(180deg);
}
.hct-mdh-block-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 320ms cubic-bezier(0.4, 0.0, 0.2, 1);
}
.hct-mdh-block.open .hct-mdh-block-content {
  max-height: 5000px;
}
.hct-mdh-block-content > .hct-mdh-inner {
  padding: 12px 14px;
}
.hct-mdh-text {
  font-size: 12.5px;
  line-height: 1.65;
  color: rgba(255,255,255,0.88);
}
.hct-mdh-text p { margin: 0 0 8px; }
.hct-mdh-placeholder {
  font-style: italic;
  color: rgba(255,255,255,0.5);
  font-size: 11.5px;
  line-height: 1.5;
  padding: 8px 10px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  border-left: 2px solid rgba(167,139,250,0.4);
}

/* ── CTA BUTTONS ─────────────────────────────────────────────────────── */
.hct-cta-btn {
  width: 100%;
  margin-top: 18px;
  padding: 14px;
  background: linear-gradient(135deg, #c9a14a 0%, #b08838 100%);
  color: #1a1410;
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 8px 20px -8px rgba(201,161,74,0.5);
  transition: transform 160ms ease;
}
.hct-cta-btn:hover { transform: translateY(-1px); }
.hct-cta-btn:active { transform: scale(0.98); }
.hct-cta-btn-secondary {
  width: 100%;
  margin-top: 8px;
  padding: 12px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.hct-cta-btn-secondary:hover {
  background: rgba(255,255,255,0.1);
}

/* ── INDICATOR FIXED WRAPPER (Phase 4b · floating über Hajj-Plan) ─────── */
/* v6.12-C-fix5 (03.05.2026): LEGACY — wird nicht mehr genutzt wenn Slot vorhanden,
   aber bleibt als Fallback. Pille jetzt direkt im .hcj-tabs Bar (kein Springen). */

/* NEUER MODUS: Pille im Tab-Slot */
.hcj-tabs-pill-slot {
  margin-left: auto;          /* schiebt Pille ganz nach rechts in Tab-Bar */
  display: flex;
  align-items: center;
}
.hcj-tabs-pill-slot:empty {
  display: none;              /* kein leerer Slot wenn keine Pille */
}
.hcj-tabs-pill-slot .hct-type-indicator {
  margin: 0;                  /* überschreibt Default-Margin */
  padding: 4px 9px 4px 10px;
  font-size: 9px;
  letter-spacing: 0.10em;
  background: rgba(201,161,74,0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
  border: 1px solid rgba(201,161,74,0.4);
}
.hcj-tabs-pill-slot .hct-type-indicator:hover,
.hcj-tabs-pill-slot .hct-type-indicator:active {
  background: rgba(201,161,74,0.32);
  transform: translateY(-1px);
}

.hct-indicator-fixed {
  position: fixed;
  /* Phase 4b-fix2: top + right werden dynamisch via JS gesetzt (positionIndicator()) — anchor .hcj-tabs */
  top: 320px;              /* Fallback */
  right: 14px;             /* Fallback — JS rechnet exakt nach */
  left: auto;
  display: none;
  align-items: center;     /* vertikal zentriert mit Tabs-Zeile */
  z-index: 10500;          /* zwischen hcj-modal (10000) und hct-modal (11002) */
  pointer-events: none;    /* default */
  transition: top 80ms linear, right 80ms linear;
}
.hct-indicator-fixed.hct-indicator-fixed--visible {
  display: flex;
  /* v6.12-C-fix4 (03.05.2026): Keine Animation mehr — Pille erscheint einfach,
     Position wird vorab via JS gesetzt. Kein Springen, kein Slide. */
}
.hct-indicator-fixed > .hct-type-indicator {
  margin: 0;
  pointer-events: auto;
  font-family: 'JetBrains Mono', monospace;
  /* Phase 4b-fix2: kompakter für Inline-Platzierung neben Tabs */
  padding: 4px 9px 4px 10px;
  font-size: 9px;
  letter-spacing: 0.10em;
  gap: 4px;
  background: rgba(201,161,74,0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
  border: 1px solid rgba(201,161,74,0.4);
}
.hct-indicator-fixed > .hct-type-indicator:hover,
.hct-indicator-fixed > .hct-type-indicator:active {
  background: rgba(201,161,74,0.32);
  transform: translateY(-1px);
}
@keyframes hctIndicatorFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── INDICATOR (im Hajj-Plan) ────────────────────────────────────────── */
.hct-type-indicator {
  background: rgba(201,161,74,0.15);
  border: 1px solid rgba(201,161,74,0.3);
  border-radius: 999px;
  padding: 6px 10px 6px 12px;
  margin: 10px 18px 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c9a14a;
  cursor: pointer;
  transition: background 160ms ease;
}
.hct-type-indicator:hover {
  background: rgba(201,161,74,0.22);
}
