/*
 * Free creator tools on vixxxen.ai (specs: free creator tools, section 3.3).
 * Every rule is scoped under .vx-tool (and .vx-tool-dialog) so the page's own
 * styles are never touched, and the page's global p / h2 / li / ul rules are
 * reset inside the tool. Mobile-first: phone single column, wider layouts at
 * 600px and 1024px. Touch targets 44px or more, inputs 16px (no iOS zoom).
 */
.vx-tool {
  --vxt-panel: #171717;
  --vxt-field: #0f0f0f;
  --vxt-border: #292929;
  --vxt-border-strong: #3a3a3a;
  --vxt-text: #e0e0e0;
  --vxt-muted: #a8a8a8;
  --vxt-accent: #00b2ff;
  --vxt-accent-soft: rgba(0, 178, 255, 0.14);
  --vxt-error: #ff6b6b;
  --vxt-ok: #4ade80;
  --vxt-primary: linear-gradient(135deg, #ff2ebb, #00b2ff);
  display: block;
  margin: 28px 0 0;
  color: var(--vxt-text);
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
}
.vx-tool *, .vx-tool *::before, .vx-tool *::after { box-sizing: border-box; }
/* :where() keeps the reset at class weight, so the component rules below win
   by source order while the page's bare p / li / h2 rules still lose. */
.vx-tool :where(h2, h3, p, ul, ol, li, fieldset, legend, label, figure) {
  margin: 0;
  padding: 0;
  border: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  list-style: none;
}
.vx-tool :where(button, input, textarea) { font-family: inherit; }
.vx-tool :where(a) { color: var(--vxt-accent); }
.vx-tool [hidden] { display: none !important; }

.vx-tool__title { font-size: 1.45rem; font-weight: 800; line-height: 1.2; color: #fff; }
.vx-tool__intro { margin-top: 6px; color: #ccc; }
.vx-tool__noscript { margin-top: 12px; padding: 12px 14px; border: 1px solid var(--vxt-border); border-radius: 8px; background: var(--vxt-panel); }
.vx-tool__layout { display: grid; gap: 16px; margin-top: 16px; }
.vx-tool__panel {
  background: var(--vxt-panel);
  border: 1px solid var(--vxt-border);
  border-radius: 8px;
  padding: 16px;
}
.vx-tool__inputs { display: grid; gap: 18px; }
.vx-tool__output { display: grid; gap: 14px; min-width: 0; }
.vx-tool__updated { margin-top: 14px; color: #777; font-size: 0.85rem; }

.vx-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Fields */
.vx-field { display: grid; gap: 8px; min-width: 0; }
.vx-field__label { font-weight: 700; color: #fff; font-size: 0.98rem; }
.vx-field__help { color: var(--vxt-muted); font-size: 0.88rem; }
.vx-field__error { color: var(--vxt-error); font-size: 0.9rem; font-weight: 600; }
.vx-field__note {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 196, 0, 0.35);
  background: rgba(255, 196, 0, 0.08);
  color: #f1e3b8;
  font-size: 0.9rem;
}
.vx-input, .vx-textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid var(--vxt-border-strong);
  border-radius: 8px;
  background: var(--vxt-field);
  color: #fff;
  font-size: 16px;
  line-height: 1.4;
}
.vx-textarea { min-height: 150px; resize: vertical; display: block; }
.vx-input::placeholder, .vx-textarea::placeholder { color: #777; }
.vx-input[aria-invalid="true"], .vx-textarea[aria-invalid="true"] { border-color: var(--vxt-error); }

/* Chips: native radios / checkboxes inside a label; the input covers the chip */
.vx-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.vx-chips--segmented { flex-wrap: nowrap; }
.vx-chips--segmented .vx-chip { flex: 1 1 0; }
.vx-chip { position: relative; display: inline-flex; min-width: 44px; cursor: pointer; }
.vx-chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.vx-chip span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--vxt-border-strong);
  border-radius: 8px;
  background: #1c1c1c;
  color: #ddd;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.vx-chip input:checked + span { border-color: var(--vxt-accent); background: var(--vxt-accent-soft); color: #fff; }
.vx-chip input:focus-visible + span { outline: 2px solid var(--vxt-accent); outline-offset: 2px; }
.vx-chip input:disabled + span, .vx-chip.is-disabled span { opacity: 0.45; cursor: not-allowed; }
.vx-chip--check span { justify-content: flex-start; gap: 10px; text-align: left; }
.vx-chip--check span::before {
  content: "";
  flex: 0 0 18px;
  height: 18px;
  border: 1.5px solid #777;
  border-radius: 4px;
}
.vx-chip--check input:checked + span::before {
  border-color: var(--vxt-accent);
  background: var(--vxt-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23001018' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* Buttons */
.vx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  padding: 10px 18px;
  border: 1px solid var(--vxt-border-strong);
  border-radius: 8px;
  background: #1f1f1f;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}
.vx-btn:hover { background: #262626; }
.vx-btn--primary { min-height: 48px; border: 0; background: var(--vxt-primary); }
.vx-btn--primary:hover { background: var(--vxt-primary); opacity: 0.92; }
.vx-btn--block { width: 100%; }
.vx-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.vx-btn.is-copied { border-color: var(--vxt-ok); color: var(--vxt-ok); }
.vx-tool button:focus-visible, .vx-tool a:focus-visible, .vx-input:focus-visible, .vx-textarea:focus-visible {
  outline: 2px solid var(--vxt-accent);
  outline-offset: 2px;
}
.vx-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #bbb;
  cursor: pointer;
}
.vx-icon-btn:hover { background: #222; color: #fff; }
.vx-tool__icon { flex: 0 0 auto; display: block; }

.vx-tool__caveat, .vx-tool__hint { color: var(--vxt-muted); font-size: 0.9rem; }
.vx-tool__caveat { padding: 12px 14px; border-left: 3px solid var(--vxt-accent); background: #141414; border-radius: 0 8px 8px 0; color: #cfcfcf; }
.vx-tool__aftercopy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 12px 14px;
  border: 1px solid var(--vxt-border);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 46, 187, 0.1), rgba(0, 178, 255, 0.1));
}
.vx-tool__aftercopy p { flex: 1 1 220px; }

/* Names: results */
.vx-names { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-height: 2632px; align-content: start; }
.vx-name {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  grid-template-rows: 44px 44px;
  column-gap: 6px;
  height: 102px;
  padding: 6px 6px 6px 8px;
  border: 1px solid var(--vxt-border);
  border-radius: 8px;
  background: var(--vxt-panel);
}
.vx-name__copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  text-align: left;
  cursor: pointer;
}
.vx-name__copy:hover { background: #202020; }
.vx-name__copy .vx-tool__icon { color: #8a8a8a; }
.vx-name__copy.is-copied .vx-tool__icon { color: var(--vxt-ok); }
.vx-name__text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vx-name__display { font-weight: 700; font-size: 1rem; }
.vx-name__user { color: #9fd8ff; font-size: 0.95rem; }
.vx-name__fav { grid-column: 2; grid-row: 1 / span 2; width: 44px; height: 88px; }
.vx-name__fav[aria-pressed="true"] { color: #ffc940; }
.vx-name__fav[aria-pressed="true"] svg { fill: currentColor; }

.vx-favs { display: grid; gap: 10px; }
.vx-favs__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vx-favs__title { font-weight: 800; color: #fff; font-size: 1.05rem; }
.vx-favs__empty { color: var(--vxt-muted); font-size: 0.92rem; }
.vx-favs__list { display: grid; gap: 4px; }
.vx-favs__item { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding-left: 10px; border-radius: 8px; background: #121212; }
.vx-favs__text { min-width: 0; overflow-wrap: anywhere; }

/* Bio: outputs */
.vx-bio__limit { color: #cfcfcf; font-size: 0.92rem; }
.vx-bios { display: grid; gap: 12px; }
.vx-bio { display: grid; gap: 10px; }
.vx-bio__label { font-weight: 700; color: #fff; }
.vx-bio__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.vx-bio__count { color: var(--vxt-muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.vx-bio__count.is-over { color: var(--vxt-error); font-weight: 700; }

@media (min-width: 600px) {
  .vx-tool__panel { padding: 20px; }
  .vx-names { grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 1312px; }
}
@media (min-width: 1024px) {
  .vx-tool__layout--split { grid-template-columns: minmax(0, 400px) minmax(0, 1fr); align-items: start; }
  .vx-names { grid-template-columns: repeat(3, minmax(0, 1fr)); min-height: 872px; }
}
@media (prefers-reduced-motion: reduce) {
  .vx-tool *, .vx-tool *::before, .vx-tool *::after { transition-duration: 0.01ms !important; animation: none !important; }
}
.vx-chips--stack .vx-chip { flex: 1 1 100%; }
.vx-chips--stack .vx-chip span { justify-content: flex-start; text-align: left; }
@media (min-width: 1024px) {
  .vx-tool__inputs--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
  .vx-tool__inputs--wide .vx-span-2 { grid-column: 1 / -1; }
}

/* Menu: the tip-menu template generator (/onlyfans-menu-template/).
   Phone: one column (Quick start, Preview, Items, Menu as text) with a
   sticky Copy / Save bar. Desktop: the editor and the text on the left
   (440px), the preview sticky on the right (it scrolls inside itself on a
   short window, so nothing in it is ever out of reach). */
.vx-menu { display: grid; gap: 16px; margin-top: 16px; }
/* max-content rows: in the height-capped desktop preview, a track must never
   shrink below its content (the canvas box would overlap the buttons). */
.vx-menu__card { display: grid; grid-auto-rows: max-content; gap: 18px; align-content: start; min-width: 0; }
.vx-menu__card-title { font-size: 1.12rem; font-weight: 800; color: #fff; }
.vx-menu__rule { color: var(--vxt-muted); font-size: 0.9rem; display: flex; align-items: center; gap: 8px; }
.vx-menu__rule .vx-tool__icon { color: var(--vxt-accent); }
.vx-menu__pair { display: flex; gap: 10px; }
.vx-menu__pair > * { flex: 1 1 0; }
.vx-chips--scroll { flex-wrap: nowrap; overflow-x: auto; padding: 2px 2px 6px; margin: -2px -2px 0; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.vx-chips--scroll .vx-chip { flex: 0 0 auto; }
.vx-chips--segmented.vx-chips--wrap { flex-wrap: wrap; }
.vx-chips--segmented.vx-chips--wrap .vx-chip { flex: 1 1 90px; }

.vx-canvas-wrap {
  --vx-ph: 70vh;
  position: relative;
  width: min(100%, calc(var(--vx-ph) * 0.8));
  aspect-ratio: 1080 / 1350;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 0 0 1px var(--vxt-border);
}
.vx-canvas-wrap[data-size="story"] { width: min(100%, calc(var(--vx-ph) * 0.5625)); aspect-ratio: 1080 / 1920; }
.vx-canvas-wrap[data-size="square"] { width: min(100%, var(--vx-ph)); aspect-ratio: 1 / 1; }
.vx-canvas-wrap canvas { display: block; width: 100%; height: 100%; }

.vx-file { position: relative; display: flex; flex: 1 1 100%; }
.vx-file .vx-btn { width: 100%; }
.vx-file input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.vx-file input:focus-visible + .vx-btn { outline: 2px solid var(--vxt-accent); outline-offset: 2px; }
.vx-range { width: 100%; height: 44px; margin: 0; accent-color: var(--vxt-accent); background: transparent; }
.vx-photo { display: grid; gap: 12px; }
.vx-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.vx-actions > .vx-btn { flex: 1 1 140px; }
.vx-linkbtn { border: 0; background: transparent; color: var(--vxt-accent); min-height: 44px; padding: 0 4px; font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }
.vx-menu__status { font-weight: 700; font-size: 0.95rem; }
.vx-menu__status.is-ok { color: var(--vxt-ok); }
.vx-menu__status.is-error { color: var(--vxt-error); }
.vx-menu__status.is-info { color: #9fd8ff; }
.vx-banner { display: grid; gap: 12px; padding: 14px; border: 1px solid rgba(0, 178, 255, 0.45); border-radius: 8px; background: rgba(0, 178, 255, 0.08); color: #fff; font-weight: 600; }
.vx-confirm { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid var(--vxt-border-strong); border-radius: 8px; background: #121212; }
.vx-menu textarea[readonly] { min-height: 220px; color: #ddd; font-size: 16px; }

/* Editor rows */
.vx-rows { display: grid; gap: 10px; }
.vx-row { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--vxt-border); border-radius: 8px; background: #121212; }
.vx-row.is-locked { border-color: rgba(0, 178, 255, 0.4); }
.vx-row__fields { display: grid; grid-template-columns: minmax(0, 1fr) 104px; grid-template-areas: "name name" "note price"; gap: 8px 10px; }
.vx-row__name { grid-area: name; }
.vx-row__price { grid-area: price; }
.vx-row__note { grid-area: note; }
.vx-row__label { color: var(--vxt-muted); font-size: 0.82rem; font-weight: 700; }
.vx-price { position: relative; }
.vx-price__sign { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #9a9a9a; font-weight: 700; pointer-events: none; }
.vx-price .vx-input { padding-left: 26px; }
.vx-row__tools { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.vx-row__lock { margin-right: auto; display: inline-flex; align-items: center; color: var(--vxt-accent); }
.vx-icon-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* Sticky Copy / Save bar on phones and tablets */
.vx-menu-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(15, 15, 15, 0.96);
  border-top: 1px solid var(--vxt-border);
}
.vx-menu-bar > .vx-btn { flex: 1 1 0; min-height: 48px; padding: 10px 12px; gap: 6px; white-space: nowrap; }
.vx-menu-bar.is-tucked { display: none; }
@media (max-width: 1023px) {
  html.vx-tool-bar-on { scroll-padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  html.vx-tool-bar-on body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}

/* The download gate */
.vx-tool-dialog {
  /* The pages' own "* { margin: 0 }" reset would pin a modal to the corner. */
  margin: auto;
  width: min(480px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid var(--vxt-border-strong);
  border-radius: 12px;
  background: #171717;
  color: var(--vxt-text);
  box-sizing: border-box;
}
.vx-tool-dialog::backdrop { background: rgba(0, 0, 0, 0.7); }
.vx-gate { display: grid; gap: 14px; padding: 22px; }
.vx-gate__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.vx-gate__title { font-size: 1.3rem; font-weight: 800; line-height: 1.25; color: #fff; }
.vx-gate__note { color: #f1e3b8; font-size: 0.92rem; }
.vx-gate__actions { display: grid; gap: 10px; }
.vx-gate .vx-btn { min-height: 48px; width: 100%; }
@media (max-width: 767px) {
  .vx-tool-dialog { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 16px 16px 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom); }
}

@media (min-width: 600px) {
  .vx-row__fields { grid-template-columns: minmax(0, 1fr) 120px; }
}
@media (min-width: 1024px) {
  .vx-menu {
    grid-template-columns: 440px minmax(0, 1fr);
    grid-template-areas: "quick preview" "items preview" "text preview";
    align-items: start;
    gap: 20px 24px;
  }
  .vx-menu__quick { grid-area: quick; }
  .vx-menu__items { grid-area: items; }
  .vx-menu__text { grid-area: text; }
  .vx-menu__preview { grid-area: preview; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; gap: 14px; }
  .vx-canvas-wrap { --vx-ph: max(340px, calc(100vh - 430px)); }
  .vx-file { flex: 1 1 200px; }
  .vx-actions > .vx-btn { flex: 0 0 auto; white-space: nowrap; }
  .vx-menu-bar { display: none !important; }
}
