/* Страница конструктора Share2 для V-Blog.*/

.share2-builder-page code,
.share2-builder-page .code-inline {
  text-transform: none;
  letter-spacing: 0;
}

.share2-builder-page .share2-hero {
  min-height: auto;
}

.share2-builder-page .social-row {
  display: flex;
  align-items: center;
  min-height: 58px;
}

.share2-builder-page .share2-card,
.share2-builder-page .share2-preview-box {
  border: 1px solid var(--vb-border);
  background: rgba(148, 163, 184, .07);
}

[data-bs-theme="dark"] .share2-builder-page .share2-card,
[data-bs-theme="dark"] .share2-builder-page .share2-preview-box {
  background: rgba(15, 23, 42, .34);
}

.share2-builder-page .share2-subtitle {
  font-size: .92rem;
  text-transform: uppercase;
  letter-spacing: .075em;
  color: var(--vb-brand);
  font-weight: 950;
  margin-bottom: 6px;
}

.share2-builder-page .mini-help,
.share2-builder-page .share2-note {
  color: var(--vb-text-soft);
  margin: 0 0 14px;
  font-size: .94rem;
  line-height: 1.55;
}

.share2-builder-page .share2-field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.share2-builder-page .share2-field > span {
  color: var(--bs-body-color);
  font-weight: 850;
}

.share2-builder-page .share2-field .form-control,
.share2-builder-page .share2-field .form-select,
.share2-builder-page .share2-code {
  border-radius: 18px;
  border: 1px solid var(--vb-border);
  background-color: var(--vb-surface-strong);
  color: var(--bs-body-color);
  font-weight: 750;
}

.share2-builder-page .share2-field .form-control,
.share2-builder-page .share2-field .form-select {
  min-height: 54px;
}

.share2-builder-page textarea.form-control {
  min-height: 92px;
  resize: vertical;
}

.share2-builder-page .share2-code {
  min-height: 270px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: .9rem;
  line-height: 1.55;
  text-transform: none;
  letter-spacing: 0;
}

.share2-builder-page .manual-page-box {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--vb-border);
  border-radius: 22px;
  background: var(--vb-surface);
}

.share2-switch-row,
.share2-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.share2-switch-row input,
.share2-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.share2-switch-ui,
.share2-switch span {
  position: relative;
  flex: 0 0 54px;
  width: 54px;
  height: 30px;
  border-radius: 999px;
  background: rgba(148, 163, 184, .36);
  border: 1px solid var(--vb-border);
  transition: background .18s ease, border-color .18s ease;
}

.share2-switch-ui::before,
.share2-switch span::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 5px 14px rgba(15,23,42,.18);
  transition: transform .18s ease;
}

.share2-switch-row input:checked + .share2-switch-ui,
.share2-switch input:checked + span {
  background: linear-gradient(135deg, var(--vb-brand), var(--vb-brand-2));
  border-color: transparent;
}

.share2-switch-row input:checked + .share2-switch-ui::before,
.share2-switch input:checked + span::before {
  transform: translateX(24px);
}

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

.share2-switch {
  min-height: 58px;
  padding: 12px;
  border: 1px solid var(--vb-border);
  border-radius: 18px;
  background: rgba(148, 163, 184, .07);
  font-weight: 750;
}

/* === Premium service chips for V-Blog style === */

.service-sort {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.service-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  min-width: 0;
  flex: 0 0 auto;

  padding: .65rem .8rem;
  border-radius: 999px;
  border: 1px solid var(--vb-border);
  background:
    linear-gradient(135deg, rgba(255,255,255,.82), rgba(255,255,255,.48));
  color: var(--bs-body-color);
  box-shadow:
    0 10px 26px rgba(15, 23, 42, .08),
    inset 0 1px 0 rgba(255,255,255,.75);
  transition:
    border-color .18s ease,
    box-shadow .18s ease,
    background .18s ease,
    transform .18s ease;
}

.service-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(109, 93, 251, .38);
  box-shadow:
    0 16px 38px rgba(109, 93, 251, .16),
    inset 0 1px 0 rgba(255,255,255,.78);
}

.service-chip label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  white-space: nowrap;
  cursor: pointer;
  font-weight: 850;
  font-size: .92rem;
  line-height: 1;
}

.service-chip label span {
  color: var(--bs-body-color);
}

.service-chip .drag-handle {
  flex: 0 0 auto;
  cursor: grab;
  user-select: none;
  line-height: 1;
  color: var(--vb-text-soft);
  font-weight: 900;
  opacity: .75;
}

.service-chip .drag-handle:active {
  cursor: grabbing;
}

.service-chip input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--vb-brand);
  cursor: pointer;
}

.service-chip:has(input[type="checkbox"]:checked) {
  border-color: rgba(109, 93, 251, .42);
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.72), transparent 36%),
    linear-gradient(135deg, rgba(109,93,251,.14), rgba(0,212,255,.10)),
    var(--vb-surface-strong);
}

.service-chip:has(input[type="checkbox"]:checked) .drag-handle {
  color: var(--vb-brand);
  opacity: .9;
}

.service-chip input {
  width: 18px;
  height: 18px;
  accent-color: var(--vb-brand);
}

.share2-range-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.share2-range-head b {
  flex: 0 0 auto;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(109,93,251,.10);
  color: var(--vb-brand);
  font-size: .86rem;
}

.icon-set-current {
  padding: 14px;
  border: 1px solid var(--vb-border);
  border-radius: 20px;
  background: var(--vb-surface-strong);
  margin-bottom: 12px;
}

.icon-set-current__title {
  color: var(--vb-text-soft);
  font-weight: 850;
  font-size: .85rem;
  margin-bottom: 10px;
}

.icon-set-current__icons,
.icon-set-card span {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.icon-set-current img,
.icon-set-card img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 0px;
}

.icon-set-gallery {
  display: grid;
  gap: 10px;
  max-height: 390px;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(109,93,251,.55) transparent;
}

.icon-set-gallery::-webkit-scrollbar { width: 8px; }
.icon-set-gallery::-webkit-scrollbar-thumb { background: rgba(109,93,251,.45); border-radius: 999px; }

.icon-set-card {
  width: 100%;
  display: grid;
  gap: 10px;
  text-align: left;
  border: 1px solid var(--vb-border);
  border-radius: 18px;
  background: var(--vb-surface-strong);
  color: var(--bs-body-color);
  padding: 12px;
}

.icon-set-card:hover,
.icon-set-card.is-active {
  border-color: rgba(109,93,251,.58);
  box-shadow: 0 12px 28px rgba(109,93,251,.10);
}

.share2-preview-box {
  position: sticky;
  top: 104px;
  padding: 22px;
  border-radius: 26px;
}

.share2-fake-article {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.share2-fake-article div {
  height: 12px;
  border-radius: 999px;
  background: rgba(148,163,184,.25);
}

.share2-fake-article div:nth-child(1) { width: 92%; }
.share2-fake-article div:nth-child(2) { width: 76%; }
.share2-fake-article div:nth-child(3) { width: 58%; }

.share2-live-preview {
  min-height: 118px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  padding: 22px;
  border: 1px dashed var(--vb-border);
  background: rgba(148,163,184,.06);
}

.share2-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 2000;
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  padding: 12px 16px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--vb-brand), var(--vb-brand-2));
  box-shadow: 0 18px 44px rgba(15,23,42,.22);
  font-weight: 900;
  transition: .18s ease;
}

.share2-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 991.98px) {
  .share2-preview-box { position: static; }
  .share2-switches { grid-template-columns: 1fr; }
}

@media (max-width: 575.98px) {
  .share2-builder-page .service-panel { padding: 18px; }
  .share2-range-head { display: grid; }
  .icon-set-gallery { max-height: 320px; }
  .share2-live-preview { padding: 16px; }
}

/* === Верхний preview в hero для страницы конструктора Share2 === */

.share2-builder-page .share2-hero {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  grid-template-areas:
    "badge demo"
    "title demo"
    "lead demo"
    "actions demo"
    "stats stats";
  align-items: center;
}

.share2-builder-page .share2-hero > .badge {
  grid-area: badge;
}

.share2-builder-page .share2-hero > .hero-title {
  grid-area: title;
}

.share2-builder-page .share2-hero > .hero-lead {
  grid-area: lead;
}

.share2-builder-page .share2-hero > .d-flex {
  grid-area: actions;
}

.share2-builder-page .share2-hero > .row {
  grid-area: stats;
}

.share2-builder-page .hero-share-demo {
  grid-area: demo;
  width: 100%;
  min-width: 0;
}

.share2-builder-page .hero__glass {
  position: relative;
  width: 100%;
  min-height: 245px;
  padding: 18px;
  border-radius: 30px;
  border: 1px solid var(--vb-border);
  background:
    radial-gradient(circle at 20% 10%, rgba(255,255,255,.72), transparent 34%),
    radial-gradient(circle at 88% 24%, rgba(0,212,255,.18), transparent 38%),
    linear-gradient(145deg, rgba(255,255,255,.72), rgba(255,255,255,.34));
  box-shadow:
    0 22px 64px rgba(15, 23, 42, .13),
    inset 0 1px 0 rgba(255,255,255,.7);
  overflow: hidden;
  isolation: isolate;
}

.share2-builder-page .hero__glass::before {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -90px;
  width: 210px;
  height: 210px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(109,93,251,.28), rgba(0,212,255,.20));
  filter: blur(2px);
  z-index: -1;
}

.share2-builder-page .hero__glass::after {
  content: "";
  position: absolute;
  left: -55px;
  top: -70px;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: rgba(109,93,251,.13);
  z-index: -1;
}

.share2-builder-page .mini-window {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border-radius: 18px;
  border: 1px solid var(--vb-border);
  background: rgba(255,255,255,.64);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.68);
}

.share2-builder-page .mini-window span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--vb-brand);
  opacity: .9;
}

.share2-builder-page .mini-window span:nth-child(2) {
  background: var(--vb-brand-2);
}

.share2-builder-page .mini-window span:nth-child(3) {
  background: var(--vb-accent);
}

.share2-builder-page .hero-preview {
  min-height: 150px;
  display: grid;
  place-items: center;
  padding: 24px 10px 8px;
}

.share2-builder-page .hero-preview .seolik-share2 {
  max-width: 100%;
}

[data-bs-theme="dark"] .share2-builder-page .hero__glass {
  background:
    radial-gradient(circle at 20% 10%, rgba(96,165,250,.18), transparent 34%),
    radial-gradient(circle at 88% 24%, rgba(34,211,238,.14), transparent 38%),
    linear-gradient(145deg, rgba(15,23,42,.78), rgba(2,6,23,.52));
  box-shadow:
    0 24px 70px rgba(0, 0, 0, .34),
    inset 0 1px 0 rgba(255,255,255,.08);
}

[data-bs-theme="dark"] .share2-builder-page .mini-window {
  background: rgba(15,23,42,.62);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

/* Планшет и мобильная версия */
@media (max-width: 991.98px) {
  .share2-builder-page .share2-hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "badge"
      "title"
      "demo"
      "lead"
      "actions"
      "stats";
  }

  .share2-builder-page .hero__glass {
    min-height: 205px;
  }

  .share2-builder-page .hero-preview {
    min-height: 120px;
    padding-top: 20px;
  }
}

@media (max-width: 575.98px) {
  .share2-builder-page .hero__glass {
    padding: 14px;
    border-radius: 24px;
  }

  .share2-builder-page .mini-window {
    height: 38px;
    border-radius: 16px;
  }

  .share2-builder-page .hero-preview {
    padding-left: 0;
    padding-right: 0;
  }
}

.seolik-share2__title {
  color: var(--seolik-share2-title-color, #1f2937);
}

[data-bs-theme="dark"] .seolik-share2__title {
  color: var(--seolik-share2-title-color-dark, #f8fafc);
}

/* === Preview placement inside generator === */

.website-preview,
#preview,
#heroPreview {
  position: relative;
  overflow: hidden;
}

#preview {
  min-height: 300px;
}

#heroPreview {
  min-height: 120px;
}

#preview .seolik-share2[data-preview="true"],
#heroPreview .seolik-share2[data-preview="true"] {
  max-width: calc(100% - 20px) !important;
  margin: 0 !important;
  z-index: 5 !important;
}

#preview .seolik-share2[data-preview="true"][data-placement="static"],
#heroPreview .seolik-share2[data-preview="true"][data-placement="static"] {
  position: relative !important;
  inset: auto !important;
  transform: none !important;
  margin: 0 auto !important;
}

#preview .seolik-share2[data-preview="true"][data-placement="top"],
#heroPreview .seolik-share2[data-preview="true"][data-placement="top"] {
  position: absolute !important;
  top: 12px !important;
  left: 12px !important;
  right: 12px !important;
  bottom: auto !important;
  width: auto !important;
  transform: none !important;
}

#preview .seolik-share2[data-preview="true"][data-placement="bottom"],
#heroPreview .seolik-share2[data-preview="true"][data-placement="bottom"] {
  position: absolute !important;
  bottom: 12px !important;
  left: 12px !important;
  right: 12px !important;
  top: auto !important;
  width: auto !important;
  transform: none !important;
}

#preview .seolik-share2[data-preview="true"][data-placement="left"],
#heroPreview .seolik-share2[data-preview="true"][data-placement="left"] {
  position: absolute !important;
  left: 12px !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translateY(-50%) !important;
}

#preview .seolik-share2[data-preview="true"][data-placement="right"],
#heroPreview .seolik-share2[data-preview="true"][data-placement="right"] {
  position: absolute !important;
  right: 12px !important;
  top: 50% !important;
  left: auto !important;
  bottom: auto !important;
  transform: translateY(-50%) !important;
}

#preview .seolik-share2[data-preview="true"][data-placement="left"] .seolik-share2__list,
#preview .seolik-share2[data-preview="true"][data-placement="right"] .seolik-share2__list,
#heroPreview .seolik-share2[data-preview="true"][data-placement="left"] .seolik-share2__list,
#heroPreview .seolik-share2[data-preview="true"][data-placement="right"] .seolik-share2__list {
  flex-direction: column;
  align-items: center;
}
