/* AL-HARAMEEN — exact-time.css («الوقت بالثانية» / Exact time)
   Builds on main.css (tokens, the DSEG7 LCD face) and tools.css. Every line the script
   fills has a fixed or reserved height, so the page never moves while the clock runs. */

.et { max-width: 980px; }
.et .section-head { margin-bottom: 16px; }

/* ---------- the clock panel ---------- */
.et-panel { text-align: center; padding: 20px 20px 16px; }
.et-cityline { display: flex; justify-content: center; align-items: baseline; gap: 0 12px; min-height: 34px; white-space: nowrap; }
/* one line, always: a long name or country is cut with an ellipsis rather than pushing the clock down */
.et-cityname, .et-country { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.et-cityname { font-family: var(--font-head); font-weight: 800; font-size: 20px; color: #fff; }
.et-country { color: var(--panel-soft); flex: 0 1 auto; }
.et-code, .et-gmt { flex: none; }
.et-code { font-family: ui-monospace, Consolas, monospace; font-weight: 700; color: var(--gold-300); }
.et-gmt { font-size: 13px; color: var(--panel-soft); }

.et-lcd {
  --lcd: #8CF5B4;
  position: relative; display: grid; place-items: center; max-width: 760px; margin: 14px auto 0;
  height: calc(1.3em + 26px); padding: 13px 12px; overflow: hidden;
  font-size: clamp(40px, 12.4vw, 112px); line-height: 1;
  background: linear-gradient(180deg, #050F09, #0B1E14); border: 1px solid var(--panel-line); border-radius: 18px;
  box-shadow: inset 0 2px 14px rgba(0, 0, 0, .65);
}
.et-ghost, .et-digits { grid-area: 1 / 1; font-family: "DSEG7", ui-monospace, monospace; white-space: nowrap; letter-spacing: .02em; }
.et-ghost { color: var(--lcd); opacity: .07; }
.et-digits { color: var(--lcd); text-shadow: 0 0 14px rgba(53, 194, 113, .35); font-variant-numeric: tabular-nums; }
.et-ap {
  position: absolute; right: 14px; top: 10px; font-family: var(--font-head); font-size: 15px; font-weight: 700;
  color: var(--lcd); opacity: .9; letter-spacing: 0; text-shadow: none;
}
.et-lcd.et-flash { animation: et-glow .9s ease-out; }
.et-lcd.et-flash .et-digits { animation: et-white .9s ease-out; }
@keyframes et-glow {
  0% { box-shadow: inset 0 0 0 3px var(--gold-500), inset 0 0 60px rgba(201, 165, 68, .35); }
  100% { box-shadow: inset 0 2px 14px rgba(0, 0, 0, .65); }
}
@keyframes et-white { 0% { color: #fff; text-shadow: 0 0 26px rgba(255, 255, 255, .85); } 100% { color: var(--lcd); } }

/* the sweep through the minute, with 60 ticks */
.et-bar {
  position: relative; max-width: 760px; height: 8px; margin: 12px auto 0; border-radius: 999px; overflow: hidden;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .2) 0 1px, transparent 1px 1.6667%), rgba(255, 255, 255, .06);
}
.et-bar span {
  display: block; height: 100%; transform: scaleX(0); transform-origin: left; will-change: transform;
  background: linear-gradient(90deg, var(--green-600), var(--live));
}
html[dir="rtl"] .et-bar span { transform-origin: right; background: linear-gradient(270deg, var(--green-600), var(--live)); }

.et-dates { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 56px; max-width: 100%; white-space: nowrap; margin-top: 12px; font-size: 16.5px; color: var(--panel-ink); }
.et-dates span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.et-dates span:last-child { color: var(--gold-300); }
.et-small { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 22px; min-height: 24px; margin-top: 8px; font-size: 14px; color: var(--panel-soft); }
.et-small .tool-ltr { font-variant-numeric: tabular-nums; color: var(--panel-ink); }
.et-next {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 8px; min-height: 30px; margin-top: 8px;
  font-size: 15px; color: var(--panel-soft);
}
.et-next b { color: #fff; font-family: var(--font-head); }
.et-next-time, .et-next-in { font-variant-numeric: tabular-nums; color: var(--panel-ink); font-weight: 700; unicode-bidi: isolate; }
.et-next-time .ap { font-size: .8em; margin-inline-start: .15em; }
.et-controls { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; min-height: 46px; margin-top: 14px; }
.et-btn { min-height: 44px; }
.et-btn:focus-visible, .et-resync:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; }
.et-fmt { display: flex; align-items: center; justify-content: center; min-width: 116px; min-height: 48px; }
.et-fmt .fmt-toggle { margin-top: 0; }
.et-panel .tool-note { margin-top: 10px; }

/* ---------- accuracy card ---------- */
.et-sync-msg { min-height: 3.2em; font-size: 18px; font-weight: 800; line-height: 1.6; color: var(--green-900); }
.et-sync-msg[data-state="failed"] { color: #8A3B00; }
.et-sync-msg[data-state="measuring"] { color: var(--ink-soft); font-weight: 700; }
.et-sync-detail { min-height: 3.6em; }
.et-resync { cursor: pointer; margin-top: 6px; }
.et-resync[disabled] { opacity: .55; cursor: progress; }
.et-how { margin-top: 14px; }
.et-how summary { cursor: pointer; font-weight: 700; color: var(--green-700); padding: 4px 0; }
.et-how p { margin: 8px 0; line-height: 1.8; color: var(--ink-soft); }

/* ---------- city card ---------- */
.et-citycard h2 { font-size: 18px; }
.et-pick { min-height: 78px; }   /* the chooser is mounted by script: its height is reserved */

/* ---------- helper: set your watch to the second ---------- */
.et-dev { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.et-field { min-width: 0; }
.et-label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 700; color: var(--ink-soft); }
.et-input {
  width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; font-size: 16px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink);
}
.et-input:focus-visible { outline: none; border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(15, 122, 68, .2); }
.et-msg { min-height: 1.5em; margin-top: 6px; font-size: 14px; font-weight: 700; color: var(--green-700); }
.et-helper h3 { margin: 14px 0 6px; font-size: 16px; color: var(--green-900); }
.et-method, .et-steps { margin: 6px 0; padding-inline-start: 24px; line-height: 1.85; }
.et-method li::marker, .et-steps li::marker { font-weight: 800; color: var(--green-700); }
.et-way { margin: 10px 0; padding: 10px 14px; border-radius: 10px; background: var(--green-100); color: var(--green-900); font-weight: 700; line-height: 1.8; }
.et-steps-box { margin-top: 8px; }
.et-steps li { padding: 2px 4px; }
.et-sec-step { background: #FFF3D1; border-radius: 6px; }
.et-media { display: grid; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.et-vid { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-size: 14px; }
.et-vid-t { flex: 1 1 240px; min-width: 0; }
.et-vid a { font-weight: 700; color: var(--green-700); }
.et-vid a.et-yt { color: #B3261E; }

@media (max-width: 560px) {
  .et-panel { padding: 16px 10px 14px; }
  .et-lcd { padding: 10px 6px; height: calc(1.3em + 20px); border-radius: 14px; }
  .et-ap { right: 8px; top: 6px; font-size: 13px; }
  .et-dates { font-size: 15.5px; }
  .et-next { min-height: 58px; align-content: center; }
  .et-pick { min-height: 131px; }
}
@media (max-width: 480px) {
  .et-dev { grid-template-columns: 1fr; }
  .et-sync-msg { font-size: 16.5px; min-height: 4.9em; }   /* three lines: the longest languages (so) */
}
@media (prefers-reduced-motion: reduce) {
  /* no animated flash: a steady gold frame for the moment of :00 */
  .et-lcd.et-flash { animation: none; box-shadow: inset 0 0 0 3px var(--gold-500); }
  .et-lcd.et-flash .et-digits { animation: none; }
}
@media print {
  .et-controls, .et-resync, .et-citycard { display: none !important; }
}

/* the manual's own note about the seconds (setup-kb.json) */
.et-official { background: #FFF3D1; color: #4A3500; }

/* a model in two editions: the sentence that tells them apart, under each family's steps title (Reviewer 2) */
.et-edition { margin: -2px 0 8px; font-size: 14px; color: var(--ink-soft); }
.et-steps-box .et-media + h3, .et-steps-box ol + h3, .et-steps-box p + h3 { margin-top: 18px; }
