/* صفرویک presenter kit: the floating button, the panel and the footer credit.
   Everything is prefixed s4k- so it never collides with a demo's own styles. */
.s4k, .s4k * { box-sizing: border-box; }
.s4k {
  --k-ink: #0b0b0c;
  --k-paper: #ffffff;
  --k-wash: #f3f3f4;
  --k-line: #e3e3e6;
  --k-mute: #6b6b73;
  --k-red: #d71f2b;
  --k-red-soft: #fdecee;
  font-family: 'Vazirmatn', system-ui, sans-serif;
  direction: rtl;
  color: var(--k-ink);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
.s4k [hidden] { display: none !important; }
.s4k button { font: inherit; }
.s4k input { font: inherit; color: inherit; }
.s4k :focus-visible { outline: 2px solid var(--k-red); outline-offset: 2px; }

/* Floating trigger */
.s4k-fab {
  position: fixed;
  left: 14px;
  bottom: calc(14px + var(--s4k-bottom, 0px) + env(safe-area-inset-bottom, 0px));
  z-index: 2147483000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--k-ink);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28), 0 0 0 1px rgba(255, 255, 255, .08) inset;
  transition: transform .2s ease;
}
.s4k-fab:hover { transform: translateY(-2px); }
.s4k-fab .s4k-mark { font-family: 'Lalezar', 'Vazirmatn', sans-serif; font-size: 19px; line-height: 1; padding-top: 3px; }
.s4k-fab .s4k-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--k-red); box-shadow: 0 0 0 4px rgba(215, 31, 43, .25); }
.s4k-fab .s4k-fab-label { font-size: 12.5px; opacity: .78; font-weight: 500; }

/* Panel */
.s4k-scrim {
  position: fixed; inset: 0; z-index: 2147483001;
  background: rgba(10, 10, 12, .42);
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.s4k-open .s4k-scrim { opacity: 1; pointer-events: auto; }
.s4k-panel {
  position: fixed; z-index: 2147483002;
  left: 0; right: 0; bottom: 0;
  max-height: 90vh; max-height: 90dvh;
  display: flex; flex-direction: column;
  background: var(--k-paper);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .25);
  transform: translateY(105%);
  transition: transform .32s cubic-bezier(.2, .8, .2, 1);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.s4k-open .s4k-panel { transform: none; }
@media (min-width: 760px) {
  .s4k-panel {
    left: 16px; right: auto; top: 16px; bottom: 16px;
    width: 420px; max-height: none;
    border-radius: 22px;
    transform: translateX(-110%);
  }
}
.s4k-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--k-line);
}
.s4k-head .s4k-mark { font-family: 'Lalezar', sans-serif; font-size: 26px; line-height: 1; padding-top: 4px; }
.s4k-head .s4k-sub { font-size: 12.5px; color: var(--k-mute); line-height: 1.4; }
.s4k-head .s4k-x {
  margin-inline-start: auto; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: var(--k-wash); cursor: pointer; font-size: 18px; line-height: 1;
}
.s4k-tabs { display: flex; gap: 6px; padding: 12px 18px 4px; }
.s4k-tab {
  flex: 1; height: 38px; border-radius: 12px; border: 1px solid var(--k-line);
  background: #fff; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--k-mute);
}
.s4k-tab[aria-selected="true"] { background: var(--k-ink); border-color: var(--k-ink); color: #fff; }
.s4k-body { overflow-y: auto; padding: 14px 18px 22px; flex: 1; overscroll-behavior: contain; }
.s4k-pane[hidden] { display: none; }
.s4k-note { font-size: 13px; color: var(--k-mute); margin: 0 0 14px; }

.s4k-field { display: block; margin-bottom: 14px; }
.s4k-field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.s4k-input {
  width: 100%; height: 44px; padding: 0 12px;
  border: 1px solid var(--k-line); border-radius: 12px; background: #fff;
  font-size: 15px;
}
.s4k-input:focus { border-color: var(--k-ink); outline: none; }
.s4k-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.s4k-swatch {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; cursor: pointer;
  box-shadow: 0 0 0 1px var(--k-line);
}
.s4k-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--k-ink); }
.s4k-color { width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; overflow: hidden; cursor: pointer; background: none; }
.s4k-img-pick {
  display: flex; align-items: center; gap: 12px;
  padding: 10px; border: 1px dashed #c9c9cf; border-radius: 14px; background: var(--k-wash);
}
.s4k-img-pick img { width: 52px; height: 52px; object-fit: contain; border-radius: 10px; background: #fff; }
.s4k-img-pick .s4k-empty { width: 52px; height: 52px; border-radius: 10px; background: #fff; display: grid; place-items: center; color: var(--k-mute); font-size: 22px; }
.s4k-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--k-line);
  background: #fff; cursor: pointer; font-size: 13.5px; font-weight: 600; text-decoration: none; color: var(--k-ink);
}
.s4k-btn.s4k-primary { background: var(--k-red); border-color: var(--k-red); color: #fff; }
.s4k-btn.s4k-dark { background: var(--k-ink); border-color: var(--k-ink); color: #fff; }
.s4k-btn.s4k-block { width: 100%; height: 46px; }
.s4k-link { background: none; border: 0; color: var(--k-mute); text-decoration: underline; cursor: pointer; font-size: 13px; padding: 0; }

/* ROI */
.s4k-slider { margin-bottom: 16px; }
.s4k-slider .s4k-sl-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 4px; }
.s4k-slider .s4k-sl-top b { font-weight: 700; white-space: nowrap; }
.s4k-slider input[type=range] { width: 100%; accent-color: var(--k-red); height: 28px; }
.s4k-result {
  margin: 6px 0 14px; padding: 16px; border-radius: 18px;
  background: var(--k-ink); color: #fff;
}
.s4k-result .s4k-r-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; opacity: .8; padding: 3px 0; }
.s4k-result .s4k-r-total { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, .15); }
.s4k-result .s4k-r-total small { display: block; font-size: 12.5px; opacity: .7; }
.s4k-result .s4k-r-total strong { display: block; font-size: 26px; line-height: 1.35; font-weight: 800; }
.s4k-result .s4k-r-pay { margin-top: 8px; font-size: 13.5px; color: #ffb3b8; }

/* Share */
.s4k-qr { display: grid; place-items: center; padding: 14px; background: #fff; border: 1px solid var(--k-line); border-radius: 18px; margin: 12px 0; }
.s4k-qr svg { width: 220px; height: 220px; display: block; }
.s4k-url { width: 100%; font-size: 12px; direction: ltr; text-align: left; height: 40px; color: var(--k-mute); }
.s4k-check { display: flex; gap: 8px; align-items: center; font-size: 13px; margin: 10px 0; cursor: pointer; }
.s4k-contact { display: grid; gap: 8px; margin-top: 8px; }

/* Toast */
.s4k-toast {
  position: fixed; z-index: 2147483003; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--k-ink); color: #fff; padding: 10px 18px; border-radius: 999px;
  font-size: 14px; transition: all .25s ease; white-space: nowrap; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis;
}
.s4k-toast.s4k-show { opacity: 1; transform: translate(-50%, 0); }

/* Footer credit, appended to the end of each demo */
.s4k-credit {
  direction: rtl; text-align: center; font-family: 'Vazirmatn', sans-serif; font-size: 12.5px;
  padding: 14px 16px calc(70px + env(safe-area-inset-bottom, 0px));
  background: var(--s4k-credit-bg, #0b0b0c); color: var(--s4k-credit-fg, rgba(255, 255, 255, .6));
}
.s4k-credit a { color: inherit; text-decoration: none; }
.s4k-credit .s4k-mark { font-family: 'Lalezar', sans-serif; font-size: 17px; color: var(--s4k-credit-mark, #fff); vertical-align: -2px; }

@media (prefers-reduced-motion: reduce) {
  .s4k-panel, .s4k-scrim, .s4k-fab, .s4k-toast { transition: none; }
}
