/* Styles for the /widget demo page. The widget itself is styled inside its
   own shadow root by assets/weather/widget.css. */

.wx-widget-intro {
  max-width: 70ch;
}

.wx-widget-intro p {
  margin: 0 0 10px;
}

/* The app WebView omits the Bootstrap stylesheet. */
.wx-mobile .wx-widget-preview {
  margin-block-start: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

.wx-widget-preview-item {
  flex: 1 1 300px;
  min-width: 0;
  padding: clamp(14px, 2vw, 24px);
  background: var(--wx-surface);
  border: 1px solid var(--wx-line);
  border-radius: 16px;
  box-shadow: var(--wx-shadow);
}

.wx-widget-preview-item h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
}

.wx-mobile .wx-widget-snippet {
  margin-block-start: 1rem;
}

.wx-widget-code {
  margin: 0 0 10px;
  padding: 12px 14px;
  background: #1c302b;
  color: #e0f4e8;
  border: 1px solid var(--wx-line);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  /* Keep the line breaks but wrap long tags so the block fits its column. */
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.wx-widget-code code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: inherit;
  color: inherit;
}

.wx-widget-status {
  margin-left: 10px;
  font-size: 13px;
  color: var(--wx-muted);
}

.wx-widget-options {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 10px 20px;
  align-items: baseline;
}

.wx-widget-options dt {
  font-weight: 600;
}

.wx-widget-options dd {
  margin: 0;
  color: var(--wx-muted);
}

.wx-widget-options code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--wx-tint);
  padding: 1px 5px;
  border-radius: 5px;
}

.wx-widget-notes {
  margin: 0;
  padding-left: 20px;
  color: var(--wx-muted);
  display: grid;
  gap: 8px;
  max-width: 70ch;
}

.wx-widget-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding-block: 8px;
  font-weight: 600;
}

.wx-widget-options {
  padding: 18px;
  background: var(--wx-soft);
  border-radius: 12px;
}

.wx-widget-preview + .wx-widget-options { margin-top: 20px; }

@media (max-width: 600px) {
  .wx-widget-options { grid-template-columns: 1fr; gap: 4px; }
  .wx-widget-options dd + dt { margin-top: 10px; }
}
