/*
  Left - styles for the seasonal countdown pages (loaded after tools.css).
*/

.sx-strings { display: none !important; }

/* The result comes first, so the unit pills sit under it. */
.sx-when {
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 650;
  line-height: 1.4;
  margin: 0 0 18px;
}
.sx-widget .tool-result { margin-top: 0; padding-top: 0; border-top: 0; }
.sx-widget .tool-units { margin: 18px 0 0; }
@media (max-width: 520px) {
  .sx-widget .tool-stat { min-height: 104px; padding: 16px 10px 14px; }
  .sx-widget .tool-units { gap: 8px; }
  .sx-widget .tool-units button { padding: 9px 14px; font-size: 14px; }
}

/* Secondary live line ("Midnight: …", "First candle: …") */
.sx-second {
  margin: 18px 0 0;
  padding: 14px 18px;
  border-radius: var(--radius-cell);
  background: color-mix(in srgb, var(--bg) 74%, var(--bg-surface) 26%);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  font-size: 16px;
  line-height: 1.4;
}
.sx-second strong { font-variant-numeric: tabular-nums; }

/* Option row (time zone, region…) */
.sx-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 18px;
  font-size: 15px;
  color: var(--text-secondary);
}
.sx-options label { font-weight: 600; color: var(--text); }
.sx-options select { max-width: 100%; min-height: 44px; flex: 1 1 220px; }

/* Result call to action: a widget preview beside the button */
.sx-cta {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}
.sx-preview {
  flex: none;
  width: 132px;
  height: 132px;
  border-radius: 28px;
  padding: 14px 14px 12px;
  background: #1C1C1E;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}
@media (prefers-color-scheme: dark) {
  .sx-preview { background: #2A2A2E; }
}
.sx-preview__title {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.sx-preview__num {
  font-size: 36px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.sx-preview__bottom { display: block; flex: none; }
.sx-preview.is-long .sx-preview__num { font-size: 28px; }
.sx-preview__unit { white-space: nowrap; }
.sx-preview__unit { font-size: 13px; font-weight: 600; opacity: 0.85; }
.sx-preview__date { display: block; margin-top: 2px; font-size: 12px; opacity: 0.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sx-cta__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.sx-cta__actions .dl-btn {
  white-space: normal;
  height: auto;
  min-height: 48px;
  text-align: center;
}
.sx-share {
  appearance: none;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.sx-share:hover { border-color: var(--text-secondary); }
.sx-share::before {
  content: '';
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v13'/%3E%3Cpath d='M7 8l5-5 5 5'/%3E%3Cpath d='M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-7'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v13'/%3E%3Cpath d='M7 8l5-5 5 5'/%3E%3Cpath d='M5 12v7a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2v-7'/%3E%3C/svg%3E") center / contain no-repeat;
}
@media (max-width: 420px) {
  .sx-cta { gap: 14px; }
  .sx-preview { width: 116px; height: 116px; border-radius: 24px; padding: 12px; }
  .sx-preview__num { font-size: 32px; }
  .sx-preview.is-long .sx-preview__num { font-size: 24px; }
}

/* Lists inside the widget (world midnights, the eight nights…) */
.sx-list {
  margin: 12px 0 0;
  border-top: 1px solid var(--hairline);
}
.sx-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 16px;
  line-height: 1.35;
}
.sx-row > :first-child { font-weight: 650; }
.sx-row > :nth-child(2) { text-align: right; font-variant-numeric: tabular-nums; }
.sx-row > :nth-child(3) {
  grid-column: 1 / -1;
  font-size: 14px;
  color: var(--text-secondary);
}
.sx-row.is-past { opacity: 0.55; }
.sx-row > :nth-child(3):empty { display: none; }
.sx-row.is-now > :first-child::after {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 8px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}
.sx-list-title {
  margin: 24px 0 0;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

/* Year tables in the prose */
.sx-table-wrap { overflow-x: auto; }
.sx-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 24px;
  font-size: 16px;
  line-height: 1.5;
}
.sx-table th,
.sx-table td {
  text-align: left;
  padding: 10px 16px 10px 0;
  border-bottom: 1px solid var(--hairline);
}
.sx-table th { font-weight: 650; }
.sx-table td { font-variant-numeric: tabular-nums; }

.sx-note { font-size: 15px !important; color: var(--text-secondary) !important; }

/* "Read more" links */
.sx-more { list-style: none; padding: 0 !important; margin: 8px 0 0; }
.sx-more li { margin: 0 0 8px; }
