/*
 * Verejný generátor widgetu Vyrok.sk.
 * Samostatný súbor úmyselne nezdiela komponentové štýly s embedom.
 */

.widget-page-hero,
.widget-builder,
.widget-how {
  --wg-ink: #182230;
  --wg-muted: #667085;
  --wg-line: #e4e7ec;
  --wg-soft: #f7f8fa;
  --wg-brand: #f97316;
  --wg-brand-dark: #c94f08;
  --wg-focus: rgba(249, 115, 22, .18);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.widget-page-hero *,
.widget-builder *,
.widget-how * {
  box-sizing: border-box;
}

.widget-page-hero {
  position: relative;
  min-height: 310px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: center;
  gap: 58px;
  margin: 34px 0 28px;
  padding: 50px 54px;
  overflow: hidden;
  border: 1px solid #e7e9ee;
  border-radius: 24px;
  background:
    radial-gradient(circle at 93% 6%, rgba(249, 115, 22, .08), transparent 31%),
    linear-gradient(135deg, #fff 0%, #fafbfc 100%);
  box-shadow: 0 18px 48px -38px rgba(16, 24, 40, .42);
}

.widget-page-hero .eyebrow,
.widget-how .eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-bottom: 17px;
  padding: 5px 10px;
  border: 1px solid #fed7aa;
  border-radius: 7px;
  background: #fff7ed;
  color: #9a3d08;
  font: 750 11px/1.25 Inter, ui-sans-serif, sans-serif;
  letter-spacing: .035em;
  text-transform: uppercase;
}

.widget-page-hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--wg-ink);
  font: 750 clamp(34px, 4.2vw, 52px)/1.08 Inter, ui-sans-serif, sans-serif;
  letter-spacing: -.04em;
}

.widget-page-hero > div:first-child > p {
  max-width: 735px;
  margin: 20px 0 0;
  color: var(--wg-muted);
  font: 500 16px/1.7 Inter, ui-sans-serif, sans-serif;
}

.widget-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 25px;
}

.widget-benefits span {
  position: relative;
  padding-left: 19px;
  color: #344054;
  font-size: 12px;
  font-weight: 650;
}

.widget-benefits span::before {
  position: absolute;
  top: 1px;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ecfdf3;
  color: #067647;
  content: "✓";
  font-size: 10px;
  font-weight: 900;
  line-height: 14px;
  text-align: center;
}

.widget-page-art {
  position: relative;
  width: 100%;
  height: 174px;
  transform: rotate(1.8deg);
  border: 1px solid #e4e7ec;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 22px 42px -28px rgba(16, 24, 40, .48);
}

.widget-page-art::before {
  position: absolute;
  top: 18px;
  left: 19px;
  width: 74px;
  height: 9px;
  border-radius: 20px;
  background: #f2f4f7;
  content: "";
  box-shadow:
    0 27px 0 #e8eaee,
    0 47px 0 #e8eaee,
    55px 27px 0 #e8eaee,
    78px 47px 0 #e8eaee;
}

.widget-page-art::after {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 78px;
  height: 30px;
  border-radius: 8px;
  background: var(--wg-brand);
  content: "";
}

.widget-page-art span {
  position: absolute;
  right: 25px;
  top: 12px;
  color: #fed7aa;
  font: 700 58px/1 Georgia, serif;
}

.widget-page-art i {
  display: none;
}

.widget-builder {
  margin: 0 0 55px;
}

.widget-builder-grid {
  display: grid;
  grid-template-columns: minmax(340px, .78fr) minmax(470px, 1.22fr);
  gap: 22px;
  align-items: start;
}

.widget-config-card,
.widget-preview-card,
.widget-code-card {
  border: 1px solid var(--wg-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 30px -24px rgba(16, 24, 40, .35);
}

.widget-config-card,
.widget-preview-card {
  padding: 28px;
}

.widget-preview-card {
  position: sticky;
  top: 18px;
}

.widget-step-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 23px;
}

.widget-step-heading > span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid #fed7aa;
  border-radius: 9px;
  background: #fff7ed;
  color: var(--wg-brand-dark);
  font-size: 13px;
  font-weight: 800;
}

.widget-step-heading small {
  display: block;
  margin: 0 0 2px;
  color: #98a2b3;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.widget-step-heading h2 {
  margin: 0;
  color: var(--wg-ink);
  font: 700 19px/1.25 Inter, ui-sans-serif, sans-serif;
  letter-spacing: -.02em;
}

.widget-config-section {
  min-width: 0;
  margin-top: 17px;
}

.widget-config-section > label,
.widget-setting-label {
  display: block;
  margin: 0 0 7px;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}

.widget-config-section select,
.widget-source-picker > input[type="search"] {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d0d5dd;
  border-radius: 9px;
  background-color: #fff;
  color: var(--wg-ink);
  font: 600 13px/1.3 Inter, ui-sans-serif, sans-serif;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.widget-config-section select {
  padding: 9px 38px 9px 12px;
}

.widget-source-picker {
  position: relative;
}

.widget-source-picker > input[type="search"] {
  padding: 9px 42px 9px 12px;
}

.widget-config-section select:hover,
.widget-source-picker > input[type="search"]:hover {
  border-color: #98a2b3;
}

.widget-config-section select:focus,
.widget-source-picker > input[type="search"]:focus {
  outline: 3px solid var(--wg-focus);
  border-color: var(--wg-brand);
}

.widget-picker-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  max-height: 260px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 30px -10px rgba(16, 24, 40, .22);
}

.widget-picker-results button {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--wg-ink);
  font-family: Inter, ui-sans-serif, sans-serif;
  text-align: left;
  cursor: pointer;
}

.widget-picker-results button:hover,
.widget-picker-results button:focus-visible {
  outline: 0;
  background: #f9fafb;
}

.widget-picker-results strong {
  font-size: 13px;
}

.widget-picker-results small,
.widget-picker-message {
  color: var(--wg-muted);
  font-size: 11px;
}

.widget-picker-message {
  display: block;
  padding: 10px;
  font-weight: 650;
}

.widget-config-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.widget-option-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.widget-option-buttons--layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.widget-option-buttons button {
  min-width: 0;
  min-height: 43px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 6px;
  border: 1px solid #d0d5dd;
  border-radius: 9px;
  background: #fff;
  color: #475467;
  font: 650 11px/1.2 Inter, ui-sans-serif, sans-serif;
  cursor: pointer;
}

.widget-option-buttons button:hover,
.widget-option-buttons button:focus-visible {
  outline: 0;
  border-color: #98a2b3;
  color: var(--wg-ink);
}

.widget-option-buttons button.is-active,
.widget-option-buttons button[aria-pressed="true"] {
  border-color: var(--wg-brand);
  background: #fff7ed;
  color: #9a3d08;
  box-shadow: 0 0 0 2px rgba(249, 115, 22, .08);
}

.theme-swatch {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  border: 1px solid rgba(16, 24, 40, .16);
  border-radius: 50%;
}

.theme-swatch--light { background: #fff; }
.theme-swatch--dark { background: #1d2939; }
.theme-swatch--brand { background: linear-gradient(135deg, #f97316 50%, #fff7ed 50%); }
.theme-swatch--auto { background: linear-gradient(90deg, #fff 50%, #1d2939 50%); }

.widget-color-field,
.widget-range-field {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.widget-color-field input[type="color"] {
  width: 32px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.widget-color-field output,
.widget-range-field output {
  color: var(--wg-muted);
  font-size: 11px;
  font-weight: 700;
}

.widget-range-field input {
  min-width: 0;
  flex: 1;
  accent-color: var(--wg-brand);
}

.widget-preview-toolbar {
  display: inline-flex;
  gap: 3px;
  margin-bottom: 12px;
  padding: 3px;
  border: 1px solid #e4e7ec;
  border-radius: 9px;
  background: #f9fafb;
}

.widget-preview-toolbar button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--wg-muted);
  font: 650 10.5px/1 Inter, ui-sans-serif, sans-serif;
  cursor: pointer;
}

.widget-preview-toolbar button.is-active {
  background: #fff;
  color: var(--wg-ink);
  box-shadow: 0 1px 3px rgba(16, 24, 40, .12);
}

.widget-device-icon {
  width: 9px;
  height: 12px;
  display: inline-block;
  flex: 0 0 auto;
  border: 1.5px solid currentColor;
  border-radius: 2px;
}

.widget-device-icon--desktop {
  width: 14px;
  height: 9px;
  box-shadow: 0 3px 0 -1px currentColor;
}

.widget-device-icon--tablet {
  width: 10px;
}

.widget-device-icon--mobile {
  width: 7px;
}

.widget-preview-stage {
  min-height: 330px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 22px;
  overflow: hidden;
  border: 1px solid #e4e7ec;
  border-radius: 14px;
  background: #f5f6f8;
}

.widget-preview-viewport {
  width: 100%;
  max-width: 100%;
  transition: width .2s ease;
}

.widget-preview-viewport iframe {
  width: 100%;
  min-height: 120px;
  display: block;
  border: 0;
  background: transparent;
}

.widget-preview-note {
  margin: 12px 0 0;
  color: var(--wg-muted);
  font-size: 11px;
  line-height: 1.55;
}

.widget-code-card {
  margin-top: 22px;
  padding: 28px;
}

.widget-code-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 14px;
  align-items: stretch;
}

.widget-code-layout textarea {
  width: 100%;
  min-height: 178px;
  resize: vertical;
  padding: 16px;
  border: 1px solid #344054;
  border-radius: 11px;
  background: #101828;
  color: #f2f4f7;
  font: 500 12px/1.6 Consolas, "SFMono-Regular", monospace;
  tab-size: 2;
}

.widget-code-layout textarea:focus {
  outline: 3px solid var(--wg-focus);
  border-color: var(--wg-brand);
}

.widget-code-actions {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
}

.widget-code-actions .btn {
  width: 100%;
  min-height: 44px;
  border-radius: 9px;
  background: var(--wg-brand);
  color: #fff;
  font-family: Inter, ui-sans-serif, sans-serif;
  text-align: center;
}

.widget-code-actions .btn:hover {
  background: #e85d0c;
}

.widget-code-actions span {
  min-height: 17px;
  color: #067647;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.widget-code-help {
  margin: 11px 0 0;
  color: var(--wg-muted);
  font-size: 11px;
  line-height: 1.55;
}

.widget-how {
  margin: 70px 0 95px;
}

.widget-how .section-head {
  margin-bottom: 22px;
}

.widget-how .section-head h2 {
  margin: 0;
  color: var(--wg-ink);
  font: 700 clamp(26px, 3vw, 36px)/1.2 Inter, ui-sans-serif, sans-serif;
  letter-spacing: -.035em;
}

.widget-how-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.widget-how-grid article {
  min-height: 180px;
  padding: 25px;
  border: 1px solid var(--wg-line);
  border-radius: 15px;
  background: #fff;
}

.widget-how-grid article > span {
  display: block;
  margin-bottom: 28px;
  color: #fdbf8a;
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -.04em;
}

.widget-how-grid h3 {
  margin: 0 0 8px;
  color: var(--wg-ink);
  font: 700 16px/1.3 Inter, ui-sans-serif, sans-serif;
}

.widget-how-grid p {
  margin: 0;
  color: var(--wg-muted);
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 980px) {
  .widget-page-hero {
    grid-template-columns: 1fr 210px;
    gap: 34px;
    padding: 42px;
  }

  .widget-builder-grid {
    grid-template-columns: 1fr;
  }

  .widget-preview-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .widget-page-hero {
    display: block;
    min-height: 0;
    padding: 34px 30px;
  }

  .widget-page-art {
    display: none;
  }

  .widget-page-hero h1 {
    font-size: clamp(32px, 9vw, 43px);
  }

  .widget-page-hero > div:first-child > p {
    font-size: 15px;
  }

  .widget-how-grid {
    grid-template-columns: 1fr;
  }

  .widget-how-grid article {
    min-height: 0;
  }
}

@media (max-width: 560px) {
  .widget-page-hero {
    margin-top: 26px;
    padding: 28px 22px;
    border-radius: 18px;
  }

  .widget-page-hero h1 {
    font-size: 32px;
  }

  .widget-benefits {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .widget-config-card,
  .widget-preview-card,
  .widget-code-card {
    padding: 21px 17px;
    border-radius: 15px;
  }

  .widget-config-row,
  .widget-code-layout {
    grid-template-columns: 1fr;
  }

  .widget-config-row {
    gap: 0;
  }

  .widget-option-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .widget-preview-toolbar {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .widget-preview-stage {
    min-height: 290px;
    padding: 10px;
  }

  .widget-how {
    margin: 55px 0 80px;
  }
}

@media (max-width: 370px) {
  .widget-benefits {
    grid-template-columns: 1fr;
  }

  .widget-preview-toolbar button span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .widget-preview-viewport {
    transition: none;
  }
}
