/* ===================================================================== */
/* Embeddable Widget Styles                                               */
/* Standalone: external sites include this file for widget styling.       */
/* Also used on the widgets showcase page.                                */
/* ===================================================================== */

/* Shared widget base */
[class^='zw-'] {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  color: #1a1a2e;
}

/* Shared "View all" link */
.zw-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 0;
  margin-top: 12px;
  border-top: 1px solid var(--border, #e5e7eb);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-muted, #6b7280);
  text-decoration: none;
  cursor: pointer;
}
.zw-link:hover {
  color: var(--accent, #3dba6e);
}
.zw-link span {
  font-size: 16px;
}

/* ---------- Today's Date Widget ---------- */
.zw-today {
  position: relative;
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(61, 186, 110, 0.1) 0%, transparent 60%),
    radial-gradient(ellipse at center, #1a2034 0%, #0b0f1a 60%, #060810 100%);
  color: #f5f6f8;
  border-radius: 18px;
  padding: clamp(28px, 4.5vw, 44px) clamp(16px, 3vw, 28px);
  text-align: center;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 24px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  isolation: isolate;
}
.zw-today::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    /* faint top highlight */
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 30%),
    /* faint bottom green vignette */
    radial-gradient(ellipse 100% 40% at 50% 100%, rgba(61, 186, 110, 0.06) 0%, transparent 70%);
}
.zw-today__weekday {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
}
.zw-today__day {
  font-size: clamp(64px, 12vw, 104px);
  font-weight: 700;
  line-height: 1;
  margin: 10px 0 8px;
  color: var(--accent, #3dba6e);
  font-family:
    'Inter',
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  font-feature-settings:
    'tnum' 1,
    'lnum' 1;
  text-shadow: 0 0 28px rgba(61, 186, 110, 0.18);
  display: inline-block;
  min-width: 2ch;
  text-align: center;
}
.zw-today__month {
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 600;
  color: #eef0f4;
  letter-spacing: -0.01em;
}
.zw-today__year {
  font-size: clamp(11px, 1.6vw, 13px);
  color: rgba(255, 255, 255, 0.42);
  margin-top: 10px;
  letter-spacing: 0.06em;
  text-transform: none;
}
.zw-today__greg {
  font-size: clamp(12px, 1.6vw, 14px);
  color: rgba(255, 255, 255, 0.45);
  margin-top: 10px;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.zw-today__fast {
  font-size: clamp(12px, 1.6vw, 14px);
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 4px 10px;
  display: inline-block;
  color: rgba(255, 255, 255, 0.7);
}
.zw-today__holiday {
  font-size: clamp(12px, 1.6vw, 14px);
  margin-top: 6px;
  background: rgba(61, 186, 110, 0.15);
  border-radius: 6px;
  padding: 4px 10px;
  display: inline-block;
  color: #3dba6e;
}

/* ---------- Ethiopian Clock Widget ---------- */
.zw-clock {
  position: relative;
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(61, 186, 110, 0.1) 0%, transparent 60%),
    radial-gradient(ellipse at center, #1a2034 0%, #0b0f1a 60%, #060810 100%);
  color: #f5f6f8;
  border-radius: 18px;
  padding: clamp(20px, 3vw, 32px);
  text-align: center;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 24px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  isolation: isolate;
}
.zw-clock::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 30%),
    radial-gradient(ellipse 100% 40% at 50% 100%, rgba(61, 186, 110, 0.06) 0%, transparent 70%);
}
.zw-clock__svg {
  width: clamp(160px, 28vw, 240px);
  height: clamp(160px, 28vw, 240px);
  display: block;
  margin: 0 auto 12px;
}
.zw-clock__digital {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  /* Lock the readout row width so the AM/PM never re-anchors on tick. */
  min-width: max-content;
}
.zw-clock__time {
  font-size: clamp(40px, 7.5vw, 64px);
  font-weight: 600;
  /* JetBrains Mono is loaded site-wide and has a real tnum table that
     survives headless rendering — a stronger floor than Georgia for the
     stable-width pin from PR #90. The min-width slot stays as belt-and-braces. */
  font-family:
    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono',
    monospace;
  line-height: 1;
  color: #f5f6f8;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  font-feature-settings:
    'tnum' 1,
    'lnum' 1;
  display: inline-block;
  /* Keep the explicit slot — wider here because the digits are bigger. */
  min-width: 4.4em;
  text-align: center;
  text-shadow:
    0 0 24px rgba(61, 186, 110, 0.18),
    0 1px 0 rgba(0, 0, 0, 0.35);
}
/* De-emphasize the seconds visually so the eye lands on HH:MM. */
.zw-clock__time .zw-clock__sec {
  font-family: inherit;
  font-feature-settings: inherit;
  font-variant-numeric: inherit;
  font-size: 0.62em;
  color: var(--accent, #3dba6e);
  opacity: 0.85;
  margin-left: 0.18em;
  vertical-align: 0.06em;
  letter-spacing: -0.02em;
}
.zw-clock__time .zw-clock__colon {
  opacity: 0.55;
  margin: 0 0.04em;
}
/* The analog face is the only thing in its card — center it vertically. */
.zw-clock--analog {
  gap: 12px;
}
.zw-clock--analog .zw-clock__svg {
  margin-bottom: 0;
}
/* Digital-only card: no SVG slot taking space, so center the readout. */
.zw-clock--digital {
  gap: 12px;
  min-height: clamp(180px, 28vw, 260px);
  justify-content: center;
}
.zw-clock__ampm {
  font-size: clamp(11px, 1.6vw, 13px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent, #3dba6e);
  /* AM and PM render at different widths in proportional fonts; lock the slot
     so the noon/midnight switch and the time text alongside don't shift. */
  display: inline-block;
  min-width: 2.4em;
  text-align: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(61, 186, 110, 0.1);
  border: 1px solid rgba(61, 186, 110, 0.22);
}
.zw-clock__period {
  font-size: clamp(14px, 2vw, 18px);
  color: #3dba6e;
  font-weight: 600;
  margin-top: 6px;
}
.zw-clock__date {
  font-size: clamp(12px, 1.6vw, 14px);
  color: rgba(255, 255, 255, 0.55);
  margin-top: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  font-feature-settings:
    'tnum' 1,
    'lnum' 1;
}
/* Digital readout layout — stack time row and AM/PM below for hierarchy. */
.zw-clock__digital {
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.zw-clock__hm {
  display: inline-block;
  /* The widget base rule `[class^='zw-']` sets a dark text color + system
     sans on every zw- descendant. We need to explicitly override here so
     the HM digits use the same typography as the parent .zw-clock__time. */
  font: inherit;
  color: inherit;
}

/* ---------- Countdown Widget ---------- */
.zw-countdown {
  min-width: 0;
}
.zw-cd__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border, #f3f4f6);
}
.zw-cd__row:last-of-type {
  border-bottom: none;
}
.zw-cd__info {
  flex: 1;
  min-width: 0;
}
.zw-cd__name {
  font-size: clamp(14px, 2vw, 18px);
  font-weight: 600;
  color: var(--fg, #1a1a2e);
}
.zw-cd__date {
  font-size: clamp(12px, 1.6vw, 15px);
  color: var(--fg-muted, #6b7280);
}
.zw-cd__days {
  font-size: clamp(13px, 2vw, 16px);
  font-weight: 700;
  color: #3dba6e;
  white-space: nowrap;
  margin-left: 12px;
}

/* Countdown full-page flip-card style */
.zw-cd-full {
  background: radial-gradient(ellipse at center, #2a2218 0%, #151210 60%, #0c0a08 100%);
  border-radius: 16px;
  padding: 40px 24px;
  text-align: center;
  color: #fff;
}
.zw-cd-full__label {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #3dba6e;
  margin-bottom: 32px;
  font-weight: 600;
}
.zw-cd-full__boxes {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}
.zw-cd-full__box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 20px 16px 14px;
  min-width: 0;
  flex: 1 1 0;
  text-align: center;
  overflow: hidden;
}
.zw-cd-full__num {
  font-size: clamp(28px, 8vw, 42px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-feature-settings:
    'tnum' 1,
    'lnum' 1;
  font-family: Georgia, 'Times New Roman', serif;
  color: #f5f0e8;
  line-height: 1.1;
  word-break: break-all;
}
.zw-cd-full__unit {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 8px;
}
.zw-cd-full__list {
  margin-top: 24px;
  text-align: left;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}
.zw-cd-full__item {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
  cursor: pointer;
  border-radius: 8px;
  transition:
    background 0.15s,
    transform 0.1s;
}
.zw-cd-full__item:hover {
  background: rgba(255, 255, 255, 0.08);
}
.zw-cd-full__item:active {
  transform: scale(0.98);
}
.zw-cd-full__item--active {
  background: rgba(61, 186, 110, 0.15);
  border-color: rgba(61, 186, 110, 0.3);
}
.zw-cd-full__item--active .zw-cd-full__item-name {
  color: #fff;
  font-weight: 700;
}
.zw-cd-full__item:last-child {
  border-bottom: none;
}
.zw-cd-full__item-name {
  color: rgba(255, 255, 255, 0.7);
}
.zw-cd-full__item-days {
  color: #3dba6e;
  font-weight: 600;
}

/* ---------- Saints Widget ---------- */
.zw-saints {
  min-width: 0;
}
.zw-saints__card {
  display: flex;
  gap: 14px;
  background: #fefce8;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 16px;
}
.zw-saints__icon {
  font-size: clamp(40px, 6vw, 56px);
  line-height: 1;
  flex-shrink: 0;
}
.zw-saints__content {
  flex: 1;
  min-width: 0;
}
.zw-saints__badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #dc2626;
  margin-bottom: 2px;
}
.zw-saints__date {
  font-size: 12px;
  color: #78716c;
  font-family: monospace;
}
.zw-saints__name {
  font-size: clamp(15px, 2.2vw, 19px);
  font-weight: 700;
  color: #1a1a2e;
  margin: 6px 0 4px;
}
.zw-saints__note {
  font-size: clamp(12px, 1.6vw, 15px);
  color: #57534e;
  line-height: 1.4;
}

/* ---------- Converter Widget ---------- */
.zw-conv {
  min-width: 0;
}
.zw-conv__tabs {
  display: flex;
  border-bottom: 2px solid var(--border, #e5e7eb);
  margin-bottom: 16px;
  gap: 0;
}
.zw-conv__tab {
  flex: 1;
  padding: 8px 4px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-muted, #6b7280);
  cursor: pointer;
  text-align: center;
  transition: color 0.15s;
}
.zw-conv__tab:hover {
  color: var(--fg, #1a1a2e);
}
.zw-conv__tab--active {
  color: #3dba6e;
  border-bottom-color: #3dba6e;
}
.zw-conv__pane--hidden {
  display: none;
}
.zw-conv__label {
  display: block;
  font-size: 12px;
  color: var(--fg-muted, #6b7280);
  font-weight: 600;
  margin-bottom: 4px;
}
.zw-conv__label--result {
  margin-top: 14px;
}
.zw-conv__input-wrap {
  position: relative;
}
.zw-conv__input-wrap .zw-conv__input {
  padding-right: 36px;
}
.zw-conv__icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  pointer-events: none;
}
.zw-conv__input {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border, #d1d5db);
  border-radius: 8px;
  font-size: 14px;
  color: var(--fg, #1a1a2e);
  box-sizing: border-box;
  background: var(--bg-card, #fff);
}
.zw-conv__input:focus {
  outline: none;
  border-color: #3dba6e;
  box-shadow: 0 0 0 3px rgba(61, 186, 110, 0.15);
}
.zw-conv__result {
  padding: 12px;
  background: rgba(61, 186, 110, 0.08);
  border: 1px solid rgba(61, 186, 110, 0.25);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  color: #3dba6e;
  text-align: center;
}

/* ---------- Country flag image ---------- */
.zw-rates-flag {
  display: inline-block;
  width: 20px;
  height: 15px;
  border-radius: 2px;
  object-fit: cover;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ---------- Bank logo dot ---------- */
.zw-rates-bank-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  vertical-align: middle;
  flex-shrink: 0;
  overflow: hidden;
}
.zw-rates-bank-dot--logo {
  background: transparent !important;
}
.zw-rates-bank-dot img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

/* ---------- Currency Rates Card Widget ---------- */
.zw-rates-card {
  min-width: 0;
}
.zw-rates-card__loading {
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
  padding: 24px 0;
  font-size: 14px;
}
.zw-rates-card__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.zw-rates-card__cur {
  font-size: 16px;
  font-weight: 700;
  color: var(--fg, #1a1a2e);
}
.zw-rates-card__labels {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--fg-muted, #6b7280);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.zw-rates-card__labels span:nth-child(2),
.zw-rates-card__labels span:nth-child(3) {
  text-align: right;
  min-width: 54px;
}
.zw-rates-card__row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light, rgba(0, 0, 0, 0.05));
  font-size: 13px;
}
.zw-rates-card__row:last-of-type {
  border-bottom: none;
}
.zw-rates-card__row--best {
  background: rgba(61, 186, 110, 0.06);
  border-radius: 6px;
  padding: 8px 6px;
}
.zw-rates-card__bank {
  color: var(--fg, #1a1a2e);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.zw-rates-card__buy {
  text-align: right;
  font-family: monospace;
  min-width: 54px;
  color: #16a34a;
}
.zw-rates-card__sell {
  text-align: right;
  font-family: monospace;
  min-width: 54px;
  color: #ef4444;
}

/* ---------- Currency Rates Full-screen ---------- */
.zw-rates-full {
  max-width: min(800px, 94vw);
  width: 100%;
  margin: 0 auto;
}
.zw-rates-full__tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  justify-content: center;
}
.zw-rates-full__tab {
  padding: 10px 24px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.zw-rates-full__tab:hover {
  background: rgba(255, 255, 255, 0.06);
}
.zw-rates-full__tab--active {
  background: rgba(61, 186, 110, 0.15);
  border-color: rgba(61, 186, 110, 0.4);
  color: #3dba6e;
}
.zw-rates-full__chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 20px;
}
.zw-rates-full__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
}
.zw-rates-full__chip:hover {
  background: rgba(255, 255, 255, 0.08);
}
.zw-rates-full__chip--active {
  background: rgba(61, 186, 110, 0.15);
  border-color: rgba(61, 186, 110, 0.4);
  color: #3dba6e;
  font-weight: 700;
}
.zw-rates-full__table {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  overflow: hidden;
}
.zw-rates-full__table-head {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.zw-rates-full__table-head span:nth-child(2),
.zw-rates-full__table-head span:nth-child(3) {
  text-align: right;
  min-width: 60px;
}
.zw-rates-full__row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
  color: #ffffff;
}
.zw-rates-full__row:last-child {
  border-bottom: none;
}
.zw-rates-full__bank {
  font-weight: 600;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.zw-rates-full__curname {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  margin-left: 4px;
}
.zw-rates-full__best {
  display: inline-block;
  background: #b8860b;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}
.zw-rates-full__buy {
  text-align: right;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-weight: 600;
  min-width: 60px;
  color: #4ade80;
}
.zw-rates-full__sell {
  text-align: right;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-weight: 600;
  min-width: 60px;
  color: #f87171;
}

/* Rates full-screen: allow scrolling for long table */
.widget-full__body .zw-rates-full {
  max-width: min(800px, 94vw);
  align-self: flex-start;
  margin: clamp(20px, 4vh, 60px) auto;
}

/* ---------- Showcase page layout ---------- */
.widgets__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: clamp(16px, 3vw, 32px);
  padding: 8px 0;
}
.widgets__card {
  position: relative;
  background: var(--surface-card, var(--bg-elev, #fff));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-lg, 20px);
  padding: clamp(18px, 2.4vw, 28px);
  display: flex;
  flex-direction: column;
  min-height: 380px;
  /* Prevent the live-clock readout from forcing the grid track to grow when
     the second digit width changes. The card already gets its width from
     the parent grid; isolate inner reflow so it can't escape upward. */
  min-width: 0;
  contain: layout;
  box-shadow: var(--shadow, 0 4px 16px rgba(0, 0, 0, 0.06));
  transition:
    transform var(--dur-base, 220ms) var(--ease, cubic-bezier(0.2, 0.8, 0.2, 1)),
    border-color var(--dur-base, 220ms) var(--ease, cubic-bezier(0.2, 0.8, 0.2, 1)),
    box-shadow var(--dur-base, 220ms) var(--ease, cubic-bezier(0.2, 0.8, 0.2, 1));
}
.widgets__card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong, rgba(255, 255, 255, 0.16));
  box-shadow: var(--shadow-hover, var(--shadow-lg, 0 16px 40px rgba(0, 0, 0, 0.12)));
}
.widgets__card-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.widgets__card-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-soft, #f3f4f6);
  border-radius: 10px;
  flex-shrink: 0;
  color: var(--accent, #3dba6e);
}
.widgets__card-info {
  flex: 1;
  min-width: 0;
}
.widgets__card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--fg, #1a1a2e);
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.widgets__card-desc {
  font-size: 12.5px;
  color: var(--fg-muted, #6b7280);
  margin: 4px 0 0;
  line-height: 1.5;
}
.widgets__card-menu {
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--fg-muted, #9ca3af);
  padding: 2px 6px;
  border-radius: 6px;
  flex-shrink: 0;
}
.widgets__card-menu:hover {
  background: var(--bg-soft, #f3f4f6);
  color: var(--fg, #1a1a2e);
}
.widgets__preview {
  flex: 1;
  display: flex;
  align-items: stretch;
}
.widgets__preview > * {
  width: 100%;
}
.widgets__embed,
.widgets__embed-btn,
.widgets__embed-code {
  display: none;
}

/* Clickable cards */
.widgets__card[role='button'] {
  cursor: pointer;
}
.widgets__card[role='button']:active {
  transform: translateY(-1px) scale(0.995);
}

/* ---------- Full-page view ---------- */
.widget-full {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: radial-gradient(ellipse at center, #2a2218 0%, #151210 60%, #0c0a08 100%);
  overflow-y: auto;
  padding: clamp(16px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.widget-full__body {
  max-width: min(1200px, 94vw);
  width: 100%;
  margin: auto;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.widget-full__body > * {
  pointer-events: auto;
}

/* Full-page: remove inner widget backgrounds (parent is already dark) */
.widget-full__body .zw-clock,
.widget-full__body .zw-today,
.widget-full__body .zw-cd-full {
  background: none;
  width: 100%;
}

/* Full-page clock */
.widget-full__body .zw-clock {
  /* Lock the full-page card width so the inner digits can't pump it. */
  contain: layout;
  text-align: center;
  padding: clamp(32px, 6vh, 64px) clamp(24px, 4vw, 48px);
  border-radius: 0;
  max-width: 90vw;
}
.widget-full__body .zw-clock__svg {
  width: clamp(240px, 40vmin, 420px);
  height: clamp(240px, 40vmin, 420px);
}
.widget-full__body .zw-clock__time {
  font-size: clamp(56px, 14vw, 140px);
  /* Same fixed-slot strategy at the larger full-page font-size. */
  min-width: 4.2em;
}
.widget-full__body .zw-clock__ampm {
  font-size: clamp(22px, 5vw, 52px);
  min-width: 2.4em;
}
.widget-full__body .zw-clock__date {
  font-size: clamp(18px, 3vw, 28px);
}

/* Full-page today */
.widget-full__body .zw-today {
  padding: clamp(32px, 6vh, 80px) clamp(24px, 6vw, 64px);
  border-radius: 0;
  max-width: 90vw;
}
.widget-full__body .zw-today__day {
  font-size: clamp(120px, 26vw, 240px);
}
.widget-full__body .zw-today__month {
  font-size: clamp(28px, 6vw, 56px);
}
.widget-full__body .zw-today__year {
  font-size: clamp(16px, 3vw, 28px);
}
.widget-full__body .zw-today__greg {
  font-size: clamp(14px, 2.5vw, 24px);
}
.widget-full__body .zw-today__fast {
  font-size: clamp(14px, 2vw, 20px);
  padding: 6px 16px;
}
.widget-full__body .zw-today__holiday {
  font-size: clamp(14px, 2vw, 20px);
  padding: 6px 16px;
}

/* Full-page countdown */
.widget-full__body .zw-cd-full {
  max-width: 90vw;
  border-radius: 0;
  padding: clamp(32px, 6vh, 64px) clamp(24px, 4vw, 48px);
}
.widget-full__body .zw-cd-full__label {
  font-size: clamp(16px, 3vw, 24px);
}
.widget-full__body .zw-cd-full__num {
  font-size: clamp(48px, 10vw, 96px);
}
.widget-full__body .zw-cd-full__unit {
  font-size: clamp(11px, 1.8vw, 16px);
}
.widget-full__body .zw-cd-full__box {
  flex: 1 1 0;
  min-width: 0;
  padding: clamp(16px, 3vw, 32px) clamp(12px, 2vw, 24px) clamp(12px, 2vw, 20px);
}
.widget-full__body .zw-countdown {
  max-width: 90vw;
  margin: 0 auto;
}
.widget-full__body .zw-cd__row {
  padding: 20px 0;
}
.widget-full__body .zw-cd__name {
  font-size: clamp(18px, 3vw, 26px);
}
.widget-full__body .zw-cd__days {
  font-size: clamp(16px, 2.5vw, 22px);
}
.widget-full__body .zw-cd-full__item {
  font-size: clamp(14px, 2.5vw, 20px);
  padding: 12px 0;
}

/* Full-page saints */
.widget-full__body .zw-saints {
  max-width: min(700px, 90vw);
  margin: 0 auto;
}
.widget-full__body .zw-saints__card {
  padding: clamp(16px, 3vw, 32px);
  gap: clamp(14px, 3vw, 24px);
}
.widget-full__body .zw-saints__icon {
  font-size: clamp(48px, 8vw, 72px);
}
.widget-full__body .zw-saints__name {
  font-size: clamp(20px, 3.5vw, 32px);
}
.widget-full__body .zw-saints__note {
  font-size: clamp(14px, 2vw, 20px);
}
.widget-full__body .zw-saints__badge {
  font-size: clamp(11px, 1.5vw, 14px);
}
.widget-full__body .zw-saints__date {
  font-size: clamp(13px, 2vw, 18px);
}

/* Full-page converter */
.widget-full__body .zw-conv {
  max-width: min(600px, 90vw);
  margin: 0 auto;
}
.widget-full__body .zw-conv__tab {
  font-size: clamp(14px, 2vw, 18px);
  padding: clamp(8px, 1.5vw, 14px) 8px;
}
.widget-full__body .zw-conv__label {
  font-size: clamp(13px, 1.8vw, 16px);
}
.widget-full__body .zw-conv__input {
  font-size: clamp(14px, 2vw, 18px);
  padding: clamp(10px, 2vw, 16px) clamp(12px, 2vw, 18px);
}
.widget-full__body .zw-conv__result {
  font-size: clamp(22px, 4vw, 34px);
  padding: clamp(12px, 2vw, 20px);
}

/* ---------- Responsive ---------- */

/* Large desktop: 3 columns */
@media (min-width: 1100px) {
  .widgets__grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .widgets__card {
    min-height: 380px;
  }
}

/* Tablet: 2 columns */
@media (min-width: 601px) and (max-width: 1099px) {
  .widgets__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .widgets__card {
    min-height: 340px;
  }
}

/* Phone: 1 column */
@media (max-width: 600px) {
  .widgets__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .widgets__card {
    min-height: 280px;
    padding: 16px;
  }
  .widget-full {
    padding: 16px;
  }
  .widget-full__body .zw-clock {
    padding: 30px 12px;
  }
  .widget-full__body .zw-clock__svg {
    width: 200px;
    height: 200px;
  }
  .widget-full__body .zw-today__day {
    font-size: 28vw;
  }
  .widget-full__body .zw-today__month {
    font-size: 7vw;
  }
}
