/* ==========================================================================
   Vakitler ekranı ve Kıble pusulası
   ========================================================================== */

.screen--times,
.screen--qibla {
  background:
    radial-gradient(90% 40% at 50% 0%, var(--soft) 0%, rgba(221, 243, 230, 0) 70%),
    var(--white);
}

/* ---------- Vakitler ---------- */
.ts__head {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: max(16px, env(safe-area-inset-top)) 16px 10px;
  background: linear-gradient(180deg, var(--white) 70%, rgba(255, 255, 255, 0));
}
.ts__title, .qb__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--emerald-deep);
}
.ts__city {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 52%;
  padding: 8px 10px 8px 8px;
  font-size: var(--text-s);
  font-weight: 700;
  color: var(--emerald-deep);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}
.ts__city span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts__city .icon { flex: none; width: 16px; height: 16px; }
.ts__body { padding: 4px 14px var(--tabbar-space); }

.ts__next {
  position: relative;
  overflow: hidden;
  padding: 16px 18px 18px;
  color: #fff;
  text-align: center;
  border-radius: 24px;
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(213, 177, 91, 0.35) 0%, rgba(213, 177, 91, 0) 55%),
    linear-gradient(155deg, #0c9a66 0%, var(--emerald) 45%, #04402b 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 5px 0 #043f29, 0 18px 26px -14px rgba(5, 92, 60, 0.8);
}
.ts__dates { display: flex; justify-content: space-between; gap: 8px; font-size: var(--text-xs); opacity: 0.9; }
.ts__dates span:last-child { color: #f2d98a; font-weight: 700; }
.ts__next-label { margin-top: 12px; font-size: var(--text-s); opacity: 0.92; }
.ts__count {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 2.9rem;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.ts__next-at { margin-top: 2px; font-size: var(--text-s); color: #f2d98a; font-weight: 700; }
.ts__bar { height: 6px; margin-top: 12px; background: rgba(255, 255, 255, 0.18); border-radius: 999px; overflow: hidden; }
.ts__bar span { display: block; height: 100%; background: linear-gradient(90deg, #f2d98a, #d5b15b); border-radius: inherit; transition: width 0.6s ease; }

.ts__today { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.ts__slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 6px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 6px 14px -12px rgba(5, 92, 60, 0.45);
}
.ts__slot-name { font-size: var(--text-xs); font-weight: 700; color: var(--ink-soft); }
.ts__slot-time { font-size: 1.15rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.ts__slot.is-past { opacity: 0.55; }
.ts__slot.is-now { background: var(--soft); border-color: rgba(8, 122, 80, 0.4); }
.ts__slot.is-now .ts__slot-name, .ts__slot.is-now .ts__slot-time { color: var(--emerald-deep); }
.ts__slot.is-next { border: 2px solid var(--gold); box-shadow: 0 0 0 3px rgba(213, 177, 91, 0.18); }

.ts__qibla {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 14px;
  padding: 10px 14px 10px 10px;
  text-align: left;
  color: inherit;
  background: linear-gradient(180deg, #fff, #f3faf6);
  border: 1px solid rgba(8, 122, 80, 0.25);
  border-radius: 18px;
  box-shadow: 0 4px 0 #cfe3d8, 0 12px 20px -14px rgba(5, 92, 60, 0.5);
  transition: transform 0.15s var(--ease-spring);
}
.ts__qibla:active { transform: translateY(3px); }
.ts__qibla-img { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; }
.ts__qibla-text { flex: 1 1 auto; display: flex; flex-direction: column; }
.ts__qibla-text strong { font-size: var(--text-m); color: var(--emerald-deep); }
.ts__qibla-text small { font-size: var(--text-xs); color: var(--ink-soft); }
.ts__qibla > .icon { width: 18px; height: 18px; color: var(--emerald); }

.ts__month { margin-top: 20px; }
.ts__month-head { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; margin-bottom: 10px; }
.ts__month-title { text-align: center; font-size: var(--text-l); font-weight: 800; color: var(--emerald-deep); }
.ts__table-wrap {
  overflow-x: auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 8px 18px -14px rgba(5, 92, 60, 0.45);
}
.ts__table { width: 100%; border-collapse: collapse; font-size: 0.78rem; font-variant-numeric: tabular-nums; }
.ts__table th, .ts__table td { padding: 7px 4px; text-align: center; white-space: nowrap; }
.ts__table thead th {
  position: sticky;
  top: 0;
  font-size: 0.68rem;
  font-weight: 800;
  color: #fff;
  background: var(--emerald);
}
.ts__table thead th:first-child { border-top-left-radius: 17px; }
.ts__table thead th:last-child { border-top-right-radius: 17px; }
.ts__table tbody tr:nth-child(even) { background: rgba(221, 243, 230, 0.35); }
.ts__table tbody th { text-align: left; padding-left: 10px; font-weight: 700; color: var(--ink); }
.ts__table tbody th small { display: block; font-size: 0.62rem; font-weight: 600; color: var(--ink-soft); }
.ts__table td { color: var(--ink); }
.ts__table tr.is-friday th .ts__day { color: var(--emerald); }
.ts__table tr.is-today { background: rgba(213, 177, 91, 0.28) !important; }
.ts__table tr.is-today th, .ts__table tr.is-today td { font-weight: 800; color: var(--emerald-deep); }
.ts__note { margin: 10px 4px 0; font-size: 0.7rem; line-height: 1.5; color: var(--ink-soft); }

/* ---------- Kıble ---------- */
.qb__head {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
  padding: max(16px, env(safe-area-inset-top)) 14px 10px;
  text-align: center;
  background: linear-gradient(180deg, var(--white) 70%, rgba(255, 255, 255, 0));
}
.qb__body { display: flex; flex-direction: column; align-items: center; padding: 0 16px var(--tabbar-space); }
.qb__place { font-size: var(--text-s); font-weight: 700; color: var(--ink-soft); }
.qb__compass {
  position: relative;
  width: min(82vw, 300px);
  aspect-ratio: 1 / 1;
  margin-top: 12px;
  border-radius: 50%;
  filter: drop-shadow(0 18px 22px rgba(4, 50, 34, 0.35));
  transition: filter 0.3s ease;
}
.qb__compass.is-aligned { filter: drop-shadow(0 0 22px rgba(213, 177, 91, 0.85)) drop-shadow(0 18px 22px rgba(4, 50, 34, 0.35)); }
.qb__svg { width: 100%; height: 100%; display: block; }
.qb__dial { transform-origin: 150px 150px; transform-box: view-box; will-change: transform; }
.qb__tick { stroke: rgba(255, 255, 255, 0.55); stroke-width: 1.5; }
.qb__tick--major { stroke: #f2d98a; stroke-width: 2.5; }
.qb__deg { fill: rgba(255, 255, 255, 0.7); font-size: 11px; font-weight: 700; text-anchor: middle; font-family: var(--font-text, sans-serif); }
.qb__dir { fill: #fff; font-size: 20px; font-weight: 800; text-anchor: middle; font-family: var(--font-display, serif); }
.qb__dir--n { fill: #f2d98a; }
.qb__kline { stroke: #f2d98a; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 4 5; }
.qb__kbox { fill: #111; stroke: #f2d98a; stroke-width: 1.5; }
.qb__kband { fill: #d5b15b; }
.qb__kdoor { fill: #d5b15b; }
.qb__pointer { fill: #f2d98a; stroke: #7d5c22; stroke-width: 1.5; }
.qb__compass.is-aligned .qb__pointer { fill: #fff6d6; }
.qb__compass.is-static .qb__dial { opacity: 0.95; }

.qb__heading {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--emerald-deep);
  font-variant-numeric: tabular-nums;
}
.qb__status {
  min-height: 1.4em;
  margin-top: 4px;
  font-size: var(--text-m);
  font-weight: 700;
  text-align: center;
  color: var(--ink);
}
.qb__status.is-ok { color: var(--emerald); }
.qb__status.is-warn {
  padding: 10px 12px;
  font-size: var(--text-s);
  font-weight: 600;
  line-height: 1.5;
  color: #6a4b12;
  background: rgba(213, 177, 91, 0.18);
  border-radius: 14px;
}
.qb__start { margin-top: 12px; max-width: 320px; }
.qb__facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  margin-top: 16px;
}
.qb__facts div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 6px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.qb__facts small { font-size: 0.68rem; font-weight: 700; color: var(--ink-soft); text-align: center; }
.qb__facts strong { font-size: var(--text-m); color: var(--emerald-deep); text-align: center; }
.qb__tip { margin: 14px 4px 0; font-size: 0.72rem; line-height: 1.5; color: var(--ink-soft); text-align: center; }

/* ---------- 3D pusula ---------- */
.qb__canvas {
  position: absolute;
  inset: -8% -8% -4%;
  width: 116%;
  height: 112%;
  display: block;
}
.qb__compass.is-3d { filter: drop-shadow(0 22px 24px rgba(4, 50, 34, 0.35)); }
.qb__compass.is-3d.is-aligned { filter: drop-shadow(0 0 26px rgba(255, 201, 60, 0.75)) drop-shadow(0 22px 24px rgba(4, 50, 34, 0.35)); }
