@import url('themes.css');
/* ═══════════════════════════════════════════════════════════════
   SendenSana — Tesbih / Zikir Sayacı (js/TasbihCounter.js ile birlikte)
   Renkler YALNIZ css/themes.css belirteçlerinden; Nefes Stüdyosu'nun kardeşi (Ses Hattı görünümü).
   ═══════════════════════════════════════════════════════════════ */
.tc {
  --tc-display: 'Bricolage Grotesque', 'Arial Narrow', 'Helvetica Neue', sans-serif;
  --tc-body: 'Karla', 'Helvetica Neue', Arial, sans-serif;
  --tc-mono: 'JetBrains Mono', Consolas, 'Courier New', monospace;

  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  min-height: min(78vh, 720px);
  background: radial-gradient(75% 75% at 50% 46%, var(--th-bg2), var(--th-bg1) 72%);
  color: var(--th-ink);
  border-radius: 24px;
  overflow: hidden;
  isolation: isolate;
  font-family: var(--tc-body);
  text-align: start;
}
.tc *, .tc *::before, .tc *::after { box-sizing: border-box; }

/* ── Sahne: bütünü dokunma alanı ── */
.tc-stage { position: relative; min-height: 480px; display: flex; }
.tc-tap {
  position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 56px 16px 104px; cursor: pointer; outline: none;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.tc-tap:focus-visible { box-shadow: inset 0 0 0 2px var(--th-in); }

.tc-hud {
  position: absolute; top: 18px; inset-inline: 22px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-family: var(--tc-mono); font-size: 0.78rem; color: var(--th-muted); font-variant-numeric: tabular-nums;
}
.tc-modeinfo { color: var(--th-ink); }

.tc-ringwrap { position: relative; width: min(100%, 440px, 56vh); aspect-ratio: 1; }
.tc-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; direction: ltr; }
.tc-track { fill: none; stroke: var(--th-line); stroke-width: 1.2; }
.tc-prog {
  fill: none; stroke: var(--th-in); stroke-width: 2.4; stroke-linecap: round;
  transition: stroke-dashoffset 0.25s ease, stroke 0.4s;
}
.tc--free .tc-prog { opacity: 0; }
.tc-beads circle { fill: var(--th-muted); opacity: 0.28; transition: fill 0.2s, opacity 0.2s; }
.tc-beads circle.on { fill: var(--th-in); opacity: 1; }
.tc-beads circle.now { fill: var(--th-ink); }
.tc--done .tc-prog, .tc--done .tc-beads circle.on { stroke: var(--th-hold); fill: var(--th-hold); }
.tc--done .tc-prog { fill: none; }
.tc-pulse { fill: none; stroke: var(--th-in); stroke-width: 1; opacity: 0; transform-origin: 100px 100px; }
.tc--tap .tc-pulse { animation: tc-pulse 0.6s ease-out; }
@keyframes tc-pulse { from { opacity: 0.45; transform: scale(0.94); } to { opacity: 0; transform: scale(1.06); } }

.tc-center {
  position: absolute; inset: 14%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center; pointer-events: none;
}
.tc-phrase {
  max-width: 100%; font-family: var(--tc-display); font-weight: 500; font-size: clamp(1.1rem, 3.4vw, 1.6rem);
  line-height: 1.2; letter-spacing: -0.01em; color: var(--th-ink); overflow-wrap: anywhere;
}
.tc-count {
  font-family: var(--tc-mono); font-weight: 500; font-size: clamp(4rem, 13vw, 7.2rem); line-height: 1;
  letter-spacing: -0.04em; color: var(--th-ink); font-variant-numeric: tabular-nums; direction: ltr;
}
.tc--tap .tc-count { animation: tc-bump 0.22s ease-out; }
@keyframes tc-bump { 40% { transform: scale(1.05); } }
.tc-of { direction: ltr; unicode-bidi: isolate; font-family: var(--tc-mono); font-size: 0.86rem; letter-spacing: 0.08em; color: var(--th-muted); font-variant-numeric: tabular-nums; }
.tc-mean { max-width: 92%; font-size: 0.86rem; line-height: 1.4; color: var(--th-muted); }
.tc-phrase[hidden], .tc-of[hidden], .tc-mean[hidden] { display: none; }

.tc-badge {
  position: absolute; top: 48px; left: 50%; transform: translate(-50%, -6px); margin: 0; z-index: 2;
  padding: 7px 14px; border-radius: 999px; background: var(--th-panel); border: 1px solid var(--th-hold);
  color: var(--th-hold); font-family: var(--tc-mono); font-size: 0.78rem; letter-spacing: 0.08em; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.3s; max-width: calc(100% - 32px);
  overflow: hidden; text-overflow: ellipsis;
}
.tc--flash .tc-badge { opacity: 1; transform: translate(-50%, 0); }

.tc-hint {
  position: absolute; bottom: 82px; inset-inline: 16px; margin: 0; text-align: center;
  font-size: 0.82rem; line-height: 1.4; color: var(--th-muted);
}
@media (hover: none) { .tc-keys { display: none; } }

.tc-bar {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 3;
  display: flex; align-items: center; gap: 6px; padding: 6px;
  border-radius: 999px; background: var(--th-panel); border: 1px solid var(--th-line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.tc-btn {
  appearance: none; border: 0; background: transparent; color: var(--th-ink);
  font: 600 0.95rem/1 var(--tc-body); white-space: nowrap;
  min-width: 44px; min-height: 44px; padding: 10px 14px; border-radius: 999px; cursor: pointer;
}
.tc-btn:hover { background: var(--th-chip); }
.tc-btn:focus-visible, .tc-x:focus-visible { outline: 2px solid var(--th-in); outline-offset: 2px; }
.tc-btn--main { background: var(--th-chip-on); color: var(--th-chip-on-ink); padding-inline: 20px; }
.tc-btn--main:hover { background: var(--th-chip-on); filter: brightness(1.08); }
.tc-btn__txt { font-weight: 500; color: var(--th-muted); margin-inline-start: 2px; }
.tc-btn--settings { display: none; }

.tc-sr, .tc-vh {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; white-space: nowrap;
}

.tc-confirm {
  position: absolute; inset: 0; z-index: 6; display: grid; place-items: center;
  background: color-mix(in srgb, var(--th-bg1) 62%, transparent); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.tc-confirm[hidden] { display: none; }
.tc-card {
  display: grid; gap: 16px; justify-items: center; text-align: center;
  max-width: min(90%, 360px); padding: 26px 26px; border-radius: 20px;
  background: var(--th-panel); border: 1px solid var(--th-line); box-shadow: 0 20px 50px var(--th-shadow);
}
.tc-card h3 { margin: 0; font-family: var(--tc-display); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.02em; color: var(--th-ink); }
.tc-card__row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tc-card .tc-btn { border: 1px solid var(--th-line); }

/* ── Ayar paneli ── */
.tc-panel {
  display: grid; align-content: start; gap: 18px;
  max-height: min(78vh, 720px); overflow-y: auto; padding: 22px 22px 24px;
  background: var(--th-panel); border-inline-start: 1px solid var(--th-line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); scrollbar-width: thin;
}
.tc-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tc-panel__head strong { font-family: var(--tc-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.02em; color: var(--th-ink); }
.tc-x {
  display: none; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--th-line); background: transparent; color: var(--th-ink); font-size: 1.3rem; cursor: pointer;
}
.tc-group { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.tc-group legend {
  margin-bottom: 8px; padding: 0; font-family: var(--tc-mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--th-muted);
}
.tc-group--off { opacity: 0.45; }
.tc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tc-chip { position: relative; cursor: pointer; }
.tc-chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tc-chip span {
  display: inline-flex; flex-direction: column; gap: 1px; padding: 7px 11px; border-radius: 10px; min-height: 36px; justify-content: center;
  background: var(--th-chip); border: 1px solid var(--th-line); color: var(--th-ink);
  font-size: 0.86rem; line-height: 1.2; transition: background 0.15s, border-color 0.15s;
}
.tc-chip b { font-weight: 600; }
.tc-chip small { font-size: 0.7rem; color: var(--th-muted); }
.tc-chip:hover span { border-color: var(--th-in); }
.tc-chip input:checked + span { background: var(--th-chip-on); border-color: transparent; color: var(--th-chip-on-ink); }
.tc-chip input:checked + span small { color: inherit; opacity: 0.8; }
.tc-chip input:focus-visible + span { outline: 2px solid var(--th-in); outline-offset: 2px; }
.tc-group:disabled .tc-chip, .tc-group:disabled .tc-chip input { cursor: default; }

.tc-field { display: grid; gap: 5px; font-size: 0.78rem; color: var(--th-muted); }
.tc-field[hidden] { display: none; }
.tc-field input {
  width: 100%; padding: 9px 11px; border-radius: 10px; border: 1px solid var(--th-line);
  background: var(--th-chip); color: var(--th-ink); font: inherit; font-size: 0.95rem; font-variant-numeric: tabular-nums;
}
.tc-field input:focus-visible { outline: 2px solid var(--th-in); outline-offset: 1px; }
.tc-field small { font-size: 0.72rem; color: var(--th-muted); }

.tc-toggles { display: flex; flex-wrap: wrap; gap: 12px 16px; }
.tc-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 0.88rem; cursor: pointer; min-height: 32px; }
.tc-toggle input { width: 18px; height: 18px; accent-color: var(--th-chip-on); }

/* ── Tam ekran ── */
.tc:fullscreen { border-radius: 0; min-height: 100vh; }

/* ── Mobil: panel alttan açılan sayfa ── */
@media (max-width: 860px) {
  .tc { grid-template-columns: 1fr; min-height: 0; border-radius: 20px; }
  .tc-stage { min-height: min(76vh, 600px); }
  .tc-btn--settings { display: inline-flex; align-items: center; }
  .tc-panel {
    position: absolute; inset-inline: 0; bottom: 0; z-index: 7; max-height: 82%;
    border-inline-start: 0; border-top: 1px solid var(--th-line); border-radius: 20px 20px 0 0;
    box-shadow: 0 -12px 40px var(--th-shadow);
    transform: translateY(105%); transition: transform 0.3s ease, visibility 0s 0.3s; visibility: hidden;
  }
  .tc--panel-open .tc-panel { transform: none; visibility: visible; transition: transform 0.3s ease, visibility 0s; }
  .tc-x { display: inline-grid; }
  .tc-hud { font-size: 0.72rem; inset-inline: 16px; top: 14px; }
  .tc-ringwrap { width: min(100%, 360px, 50vh); }
}
@media (max-width: 420px) {
  .tc-btn__txt { display: none; }
  .tc-tap { padding-top: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .tc-panel, .tc-chip span, .tc-prog, .tc-beads circle, .tc-badge { transition: none; }
  .tc--tap .tc-pulse, .tc--tap .tc-count { animation: none; }
}
/* Arapça harfler birleşik yazılır: harf aralığı açılmaz */
.tc-group legend:lang(ar), .tc-badge:lang(ar), .tc-of:lang(ar) { letter-spacing: 0; }
