/* Single-line DATE / TIME — always LTR, responsive */
.dt-board,
.dt-board-bar {
  direction: ltr !important;
  unicode-bidi: isolate;
}

.dt-board {
  --dt-value: clamp(0.92rem, 2.6vw, 1.2rem);
  --dt-label: clamp(0.68rem, 1.8vw, 0.9rem);
  --dt-gap: clamp(0.85rem, 4vw, 2.75rem);
  --dt-inner: clamp(0.3rem, 1.2vw, 0.55rem);
  --dt-dash: clamp(0.18rem, 0.8vw, 0.35rem);

  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: var(--dt-gap);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  max-width: 100%;
}

.dt-board-group {
  display: inline-flex;
  align-items: baseline;
  gap: var(--dt-inner);
  min-width: 0;
}

.dt-board-label,
.dt-board-weekday {
  font-size: var(--dt-label);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #94a3b8;
  line-height: 1;
}

.dt-board-label {
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dt-board-value {
  font-size: var(--dt-value);
  font-weight: 800;
  color: #0b1f3a;
  letter-spacing: 0.01em;
  line-height: 1;
}

.dt-dash {
  margin: 0 var(--dt-dash);
  font-weight: 500;
  color: #94a3b8;
}

.dt-ampm {
  margin-inline-start: 0.1rem;
  padding: 0.18rem 0.45rem;
  border-radius: 0.4rem;
  background: #e8f1ff;
  color: #2563eb;
  font-size: clamp(0.62rem, 1.6vw, 0.72rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  align-self: center;
}

/* Default: full words; short forms hidden until narrow screens */
.dt-short { display: none; }
.dt-full { display: inline; }

/* Public strip */
.dt-board-bar {
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  padding: clamp(0.45rem, 1.5vw, 0.7rem) 0;
  overflow: hidden;
}
.dt-board-bar .container {
  display: flex;
  align-items: center;
  direction: ltr !important;
  justify-content: center !important;
  text-align: center;
  padding-inline: clamp(0.5rem, 3vw, 1rem);
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.dt-board-bar .container::-webkit-scrollbar { display: none; }

/* Admin topbar */
.cms-topbar-datetime {
  flex: 1;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
}
.cms-topbar-datetime .dt-board {
  justify-content: center;
}
.cms-topbar .dt-board {
  --dt-value: clamp(0.85rem, 1.4vw, 1.05rem);
  --dt-label: clamp(0.62rem, 1vw, 0.8rem);
  --dt-gap: clamp(0.75rem, 2vw, 1.75rem);
}

[data-bs-theme="dark"] .dt-board-value,
html[data-theme="dark"] .dt-board-value { color: #e2e8f0; }
[data-bs-theme="dark"] .dt-board-weekday,
html[data-theme="dark"] .dt-board-weekday,
[data-bs-theme="dark"] .dt-board-label,
html[data-theme="dark"] .dt-board-label { color: #94a3b8; }
[data-bs-theme="dark"] .dt-ampm,
html[data-theme="dark"] .dt-ampm {
  background: rgba(96, 165, 250, 0.18);
  color: #93c5fd;
}
[data-bs-theme="dark"] .dt-board-bar,
html[data-theme="dark"] .dt-board-bar {
  background: #0f172a;
  border-bottom-color: #1e293b;
}

/* Tablet */
@media (max-width: 900px) {
  .dt-board {
    --dt-gap: 1.35rem;
  }
}

/* Phones: abbreviate weekday/month, keep one line */
@media (max-width: 640px) {
  .dt-board {
    --dt-value: 0.92rem;
    --dt-label: 0.68rem;
    --dt-gap: 0.85rem;
    --dt-inner: 0.28rem;
    --dt-dash: 0.16rem;
  }
  .dt-full { display: none; }
  .dt-short { display: inline; }
  .dt-ampm { padding: 0.14rem 0.35rem; }
}

/* Very small phones */
@media (max-width: 400px) {
  .dt-board {
    --dt-value: 0.82rem;
    --dt-label: 0.62rem;
    --dt-gap: 0.65rem;
  }
  .dt-sec { display: none; } /* H:M only; seconds drop to save space */
  .dt-ampm { font-size: 0.58rem; }
}
