/* Time page isolated styles */
.timepage{
  --tp-accent: #ff9a1f;
  --tp-card: rgba(255,255,255,.06);
  --tp-border: rgba(255,255,255,.10);
  --tp-text: rgba(255,255,255,.92);
  --tp-muted: rgba(255,255,255,.72);
}

.timepage .timepage__wrap{
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 16px 48px;
}

.timepage__hero{ margin-bottom: 14px; }
.timepage__h1{
  margin: 0;
  font-size: clamp(30px, 3.2vw, 44px);
  font-weight: 800;
}
.timepage__sub{ margin-top: 6px; color: var(--tp-muted); line-height: 1.45; }

.timepage__grid{
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 14px;
  align-items: start;
}
@media (max-width: 980px){
  .timepage__grid{ grid-template-columns: 1fr; }
}

.timepage__main{ padding: 18px; }
.timepage__big{ padding: 8px 4px 14px; }
.timepage__bigTime{
  font-size: clamp(48px, 6vw, 74px);
  font-weight: 900;
  letter-spacing: .8px;
  line-height: 1;
  color: var(--tp-text);
  font-variant-numeric: tabular-nums;
}
.timepage__bigTime.tp--digital{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.timepage__bigTime.tp--accent{ color: var(--tp-accent); }
.timepage__bigDate{ margin-top: 6px; color: var(--tp-muted); }

.card--inner{
  background: var(--tp-card);
  border: 1px solid var(--tp-border);
  border-radius: 14px;
  padding: 14px;
}

.timepage__panel{ margin-top: 10px; }
.timepage__panelTitle{ font-weight: 800; margin-bottom: 10px; }

.timepage__row{ display: grid; gap: 6px; margin-bottom: 10px; }
.timepage__label{ font-size: 12px; color: var(--tp-muted); }

.timepage__buttons{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.timepage__hint{
  margin-top: 10px;
  color: var(--tp-muted);
  font-size: 12px;
  line-height: 1.45;
}

.timepage__favWrap{ margin-top: 12px; }
.timepage__favGrid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.tpClock{
  background: rgba(0,0,0,.20);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  padding: 12px;
  position: relative;
  min-height: 118px;
}
.tpClock__head{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.tpClock__title{
  font-weight: 850;
  cursor: pointer;
  text-decoration: none;
  color: var(--tp-text);
}
.tpClock__title:hover{ text-decoration: underline; }
.tpClock__btn{
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  color: var(--tp-text);
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
}
.tpClock__btn:hover{ background: rgba(255,255,255,.08); }
.tpClock__time{
  margin-top: 10px;
  font-size: 34px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  color: var(--tp-accent);
}
.tpClock__time.tp--digital{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.tpClock__meta{
  margin-top: 2px;
  color: var(--tp-muted);
  font-size: 12px;
  line-height: 1.35;
}

.timepage__details{
  margin-top: 12px;
  border: 1px dashed rgba(255,255,255,.16);
  border-radius: 14px;
  padding: 10px 12px;
}
.timepage__details > summary{ cursor: pointer; color: var(--tp-text); font-weight: 700; }
.timepage__embed{ margin-top: 10px; }
.timepage__embedRow{ display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.timepage__embedInput{ width: 110px; }
.timepage__textarea{ width: 100%; min-height: 70px; margin-top: 10px; }

.timepage__doc{ margin-top: 10px; color: var(--tp-text); line-height: 1.6; }
.timepage__doc p{ margin: 10px 0; color: var(--tp-text); }

.timepage__side{ display: grid; gap: 14px; }
.timepage__sideCard{ padding: 14px; }
.timepage__sideTitle{ font-weight: 850; margin-bottom: 10px; }
.timepage__chips{ display: flex; flex-wrap: wrap; gap: 8px; }
.timepage__chip{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  cursor: pointer;
  color: var(--tp-text);
  font-size: 13px;
}
.timepage__chip:hover{ background: rgba(255,255,255,.08); }

.timepage__popular{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
}
.timepage__popular a{
  color: rgba(120,200,255,.95);
  text-decoration: none;
}
.timepage__popular a:hover{ text-decoration: underline; }

/* Modal (dark) */
.tpModal{ position: fixed; inset: 0; display: none; z-index: 9999; }
.tpModal[aria-hidden="false"]{ display: block; }
.tpModal__backdrop{ position: absolute; inset: 0; background: rgba(0,0,0,.62); }
.tpModal__win{
  position: relative;
  width: min(520px, calc(100% - 24px));
  margin: 8vh auto;
  background: rgba(20,24,30,.96);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}
.tpModal__head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.tpModal__title{ font-weight: 850; }
.tpModal__x{
  background: transparent;
  border: 0;
  color: rgba(255,255,255,.80);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
}
.tpModal__body{ padding: 14px; display: grid; gap: 12px; }
.tpModal__field{ display: grid; gap: 6px; }
.tpModal__label{ font-size: 12px; color: rgba(255,255,255,.72); }
.tpModal__foot{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255,255,255,.04);
  border-top: 1px solid rgba(255,255,255,.10);
}

.tpModal select option{
  background: #fff !important;
  color: #111 !important;
}

/* Settings switches */
.tpSet__row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(255,255,255,.10);
}
.tpSet__row:last-child{ border-bottom: 0; }
.tpSet__label{ color: rgba(255,255,255,.90); font-weight: 650; }

.tpSet__switch{ position: relative; width: 46px; height: 26px; }
.tpSet__switch input{ display:none; }
.tpSet__switch span{
  position:absolute; inset:0;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  transition: .2s;
}
.tpSet__switch span:after{
  content:"";
  position:absolute; top:3px; left:3px;
  width: 18px; height: 18px;
  background: rgba(255,255,255,.82);
  border-radius: 999px;
  transition: .2s;
}
.tpSet__switch input:checked + span{
  background: rgba(60,200,120,.35);
  border-color: rgba(60,200,120,.55);
}
.tpSet__switch input:checked + span:after{ transform: translateX(20px); }

.tpSet__colors{ border-bottom: 0; padding-top: 10px; }
.tpSet__palette{ display:flex; gap:8px; align-items:center; justify-content:flex-end; flex-wrap:wrap; }
.tpSet__dot{
  width: 18px; height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.20);
  cursor: pointer;
}
.tpSet__dot.is-active{ border-color: rgba(255,255,255,.85); }
.tpSet__muted{ margin-top: 10px; color: rgba(255,255,255,.70); font-size: 12px; line-height: 1.45; }
