/* /new/widget/ — embed code generator */

.wd-hero { text-align: center; padding: var(--s-7); }
.wd-hero .pp-card__title { justify-content: center; }
.wd-hero .pp-card__sub { font-size: var(--t-h4); color: var(--ink-2); text-align: center; max-width: 580px; margin: 0 auto; }

.wd-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 1.4fr;
  gap: var(--s-5);
}
.wd-config { position: sticky; top: 80px; align-self: start; }

.wd-field { margin-bottom: var(--s-4); }
.wd-field legend {
  font-size: var(--t-small);
  color: var(--ink-3);
  font-weight: 500;
  margin-bottom: var(--s-2);
}
.wd-field__hint {
  display: block;
  font-size: var(--t-small);
  color: var(--ink-4);
  margin-top: 4px;
}
.wd-row { display: flex; gap: var(--s-2); align-items: center; }
.wd-row input { flex: 1; }

.wd-radio-group { display: flex; flex-direction: column; gap: var(--s-2); }
.wd-radio {
  display: block;
  padding: var(--s-3);
  border: 2px solid var(--stroke);
  border-radius: var(--r-3);
  cursor: pointer;
  transition: all var(--t-fast);
}
.wd-radio:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.wd-radio input { width: auto; margin-inline-end: var(--s-2); }
.wd-radio__title { font-weight: 600; color: var(--ink-1); display: inline-flex; align-items: center; gap: 6px; }
.wd-radio__desc { display: block; font-size: var(--t-small); color: var(--ink-3); margin-top: 4px; margin-inline-start: 24px; }

.wd-check {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: 6px 0;
  cursor: pointer;
  font-size: var(--t-body);
}
.wd-check input { width: auto; }

input[type="color"] {
  width: 60px;
  height: 40px;
  padding: 2px;
  cursor: pointer;
}

/* Output column */
.wd-output { display: flex; flex-direction: column; gap: var(--s-5); }

.wd-preview {
  border: 1px solid var(--stroke);
  border-radius: var(--r-3);
  background: var(--surface-2);
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.wd-preview iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.wd-preview__empty {
  text-align: center;
  color: var(--ink-4);
  padding: var(--s-6);
}
.wd-preview__empty svg { margin: 0 auto var(--s-3); display: block; }

.wd-code-card .pp-card__title { align-items: center; }
.wd-code {
  background: var(--ink-1);
  color: #f4f5f8;
  padding: var(--s-4);
  border-radius: var(--r-3);
  font-family: var(--font-mono);
  font-size: var(--t-small);
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre;
  margin: 0;
}
.wd-code code { color: inherit; background: none; padding: 0; }

.wd-features { text-align: center; margin-top: var(--s-6); }
.wd-features .pp-card__title { justify-content: center; }
.wd-features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--s-4);
  margin-top: var(--s-4);
}
.wd-feature { padding: var(--s-3); }
.wd-feature__icon { font-size: 43.92px; margin-bottom: var(--s-2); }
.wd-feature h3 { font-size: var(--t-h4); color: var(--ink-1); margin: 0 0 4px; }
.wd-feature p { font-size: var(--t-small); color: var(--ink-3); margin: 0; }

@media (max-width: 900px) {
  .wd-grid { grid-template-columns: 1fr; }
  .wd-config { position: static; }
  .wd-preview { min-height: 280px; }
}
