/* Nexus Social — /followers siparis modali.
   Isaretleme: snippets/social-order-modal.njk, davranis: assets/nexus-social.js.

   RENKLER: sabit hex YOK. Her sey tema token'larindan gelir
   (--cl-accent, --cl-background, --cl-surface, --cl-t-primary, --cl-on-accent,
   --cl-error, --cl-border, --cl-overlay). Marka gradyani tek istisnadir ve o da
   koddan degil KARO VERISINDEN gelir: JS panelin --so-brand degiskenini yazar,
   yoksa accent yedegine duser.

   Not: built.css derlenemedigi icin Tailwind sinifi kullanilmiyor; kurallar
   dogrudan token'lara yaziliyor (temada .sg-*, .sa-back-to-top vb. ile ayni
   yaklasim). */

.nexus-theme .so-modal {
  position: fixed;
  inset: 0;
  z-index: 60; /* cart-panel/search-modal 50'de; siparis modali onlarin ustunde */
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

@media (min-width: 640px) {
  .nexus-theme .so-modal {
    align-items: center;
    padding: 24px;
    overflow-y: auto;
  }
}

.nexus-theme .so-modal[hidden] {
  display: none;
}

.nexus-theme .so-modal__overlay {
  position: absolute;
  inset: 0;
  background: var(--cl-overlay);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity var(--dur, 200ms) var(--ease, ease);
}

.nexus-theme .so-modal.is-open .so-modal__overlay {
  opacity: 1;
}

.nexus-theme .so-modal__panel {
  position: relative;
  width: 100%;
  max-width: 940px;
  max-height: 92dvh;
  overflow-y: auto;
  border: var(--border-w) solid var(--cl-border);
  border-bottom: 0;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  background: rgb(var(--cl-surface));
  box-shadow: var(--shadow-modal);
  /* Marka gradyani JS ile yazilir; hic gelmezse accent'ten turetilen yedek. */
  --so-brand: linear-gradient(135deg, rgba(var(--cl-accent), 0.95), rgba(var(--cl-accent), 0.55));
  transform: translateY(24px);
  opacity: 0;
  transition: transform var(--dur, 200ms) var(--ease, ease), opacity var(--dur, 200ms) var(--ease, ease);
}

.nexus-theme .so-modal__panel:focus {
  outline: none;
}

.nexus-theme .so-modal.is-open .so-modal__panel {
  transform: none;
  opacity: 1;
}

@media (min-width: 640px) {
  .nexus-theme .so-modal__panel {
    max-height: none;
    border-bottom: var(--border-w) solid var(--cl-border);
    border-radius: var(--radius-card);
    transform: translateY(12px) scale(0.98);
  }
}

.nexus-theme .so-grabber {
  display: block;
  width: 40px;
  height: 4px;
  margin: 10px auto 0;
  border-radius: 9999px;
  background: rgba(var(--cl-t-primary), 0.18);
}

@media (min-width: 640px) {
  .nexus-theme .so-grabber { display: none; }
}

/* ── Baslik seridi ───────────────────────────────────────────────────── */

.nexus-theme .so-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  overflow: hidden;
  border-bottom: var(--border-w) solid var(--cl-border);
}

@media (min-width: 640px) {
  .nexus-theme .so-head { padding: 22px 26px; }
}

.nexus-theme .so-head__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
}

/* Perde: arkada gorsel de olsa marka gradyani da olsa baslik okunur kalmali. */
.nexus-theme .so-head__wash {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgb(var(--cl-surface)) 12%, rgba(var(--cl-surface), 0.72) 55%, rgba(var(--cl-surface), 0.35) 100%);
}

.nexus-theme .so-modal__panel.has-brand .so-head::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--so-brand);
  opacity: 0.16;
}

.nexus-theme .so-head__icon {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background-image: var(--so-brand);
  color: rgb(var(--cl-on-accent));
  font-size: 21px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

.nexus-theme .so-head__text {
  position: relative;
  min-width: 0;
  flex: 1;
}

.nexus-theme .so-head__title {
  font-family: var(--ff-heading);
  font-size: clamp(20px, 2.4vw, 26px);
  font-weight: var(--fw-heading, 800);
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: rgb(var(--cl-t-primary));
}

.nexus-theme .so-head__sub {
  margin-top: 4px;
  font-size: 13px;
  color: rgba(var(--cl-t-primary), 0.62);
}

.nexus-theme .so-close {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  border: var(--border-w) solid var(--cl-border);
  background: rgba(var(--cl-background), 0.55);
  color: rgba(var(--cl-t-primary), 0.7);
  transition: color var(--dur, 200ms) var(--ease, ease), background-color var(--dur, 200ms) var(--ease, ease);
}

.nexus-theme .so-close svg { width: 17px; height: 17px; }

.nexus-theme .so-close:hover {
  background: rgba(var(--cl-t-primary), 0.1);
  color: rgb(var(--cl-t-primary));
}

/* ── Govde ───────────────────────────────────────────────────────────── */

.nexus-theme .so-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 880px) {
  .nexus-theme .so-body {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  }
}

.nexus-theme .so-main {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 20px;
}

@media (min-width: 640px) {
  .nexus-theme .so-main { padding: 24px 26px; }
}

.nexus-theme .so-step__head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 11px;
  font-family: var(--ff-body);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(var(--cl-t-primary), 0.55);
}

.nexus-theme .so-step__n {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border-radius: 9999px;
  background: rgba(var(--cl-accent), 0.16);
  color: rgb(var(--cl-accent));
  font-size: 10px;
  letter-spacing: 0;
}

/* ── 1. Servis kartlari ──────────────────────────────────────────────── */

.nexus-theme .so-services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

@media (min-width: 520px) {
  .nexus-theme .so-services { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}

.nexus-theme .so-svc {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 13px 14px;
  text-align: left;
  border: var(--border-w) solid var(--cl-border);
  border-radius: var(--radius-input);
  background: rgba(var(--cl-background), 0.4);
  transition: border-color var(--dur, 200ms) var(--ease, ease),
              background-color var(--dur, 200ms) var(--ease, ease);
}

.nexus-theme button.so-svc:hover:not(:disabled) {
  border-color: rgba(var(--cl-accent), 0.45);
}

.nexus-theme .so-svc.is-on {
  border-color: rgb(var(--cl-accent));
  background: rgba(var(--cl-accent), 0.1);
}

.nexus-theme .so-svc.is-out {
  opacity: 0.45;
  cursor: not-allowed;
}

.nexus-theme .so-svc__name {
  font-size: 14px;
  font-weight: 700;
  color: rgb(var(--cl-t-primary));
}

.nexus-theme .so-svc__price {
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(var(--cl-t-primary), 0.55);
  font-variant-numeric: tabular-nums;
}

.nexus-theme .so-svc.is-on .so-svc__price {
  color: rgba(var(--cl-accent), 0.95);
}

/* Tik: yalnizca secili kartta. Renk kontrasti icin accent uzeri on-accent. */
.nexus-theme .so-svc__tick {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 9999px;
  background: rgb(var(--cl-accent));
  color: rgb(var(--cl-on-accent));
  opacity: 0;
  transform: scale(0.6);
  transition: opacity var(--dur, 200ms) var(--ease, ease), transform var(--dur, 200ms) var(--ease, ease);
}

.nexus-theme .so-svc__tick svg { width: 10px; height: 10px; }

.nexus-theme .so-svc.is-on .so-svc__tick {
  opacity: 1;
  transform: none;
}

/* ── 2. Baglanti ─────────────────────────────────────────────────────── */

.nexus-theme .so-link {
  width: 100%;
  padding: 12px 14px;
  border: var(--border-w) solid var(--cl-border);
  border-radius: var(--radius-input);
  background: rgba(var(--cl-background), 0.5);
  color: rgb(var(--cl-t-primary));
  font-size: 14px;
  transition: border-color var(--dur, 200ms) var(--ease, ease);
}

.nexus-theme .so-link::placeholder {
  color: rgba(var(--cl-t-primary), 0.35);
}

.nexus-theme .so-link:focus {
  outline: none;
  border-color: rgb(var(--cl-accent));
}

.nexus-theme .so-note {
  margin-top: 7px;
  font-size: 11.5px;
  line-height: 1.5;
  color: rgba(var(--cl-t-primary), 0.5);
}

/* ── 3. Miktar ───────────────────────────────────────────────────────── */

.nexus-theme .so-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 9999px;
  background:
    linear-gradient(to right, rgb(var(--cl-accent)) var(--so-fill, 0%), rgba(var(--cl-t-primary), 0.14) var(--so-fill, 0%));
}

.nexus-theme .so-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  border: 3px solid rgb(var(--cl-surface));
  background: rgb(var(--cl-accent));
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
  cursor: grab;
}

.nexus-theme .so-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  border: 3px solid rgb(var(--cl-surface));
  background: rgb(var(--cl-accent));
  cursor: grab;
}

.nexus-theme .so-range:focus-visible {
  outline: 2px solid rgb(var(--cl-accent));
  outline-offset: 4px;
}

.nexus-theme .so-range:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.nexus-theme .so-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

.nexus-theme .so-preset {
  padding: 7px 14px;
  border: var(--border-w) solid var(--cl-border);
  border-radius: 9999px;
  background: rgba(var(--cl-background), 0.5);
  color: rgba(var(--cl-t-primary), 0.72);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: border-color var(--dur, 200ms) var(--ease, ease),
              background-color var(--dur, 200ms) var(--ease, ease),
              color var(--dur, 200ms) var(--ease, ease);
}

.nexus-theme .so-preset:hover:not(:disabled) {
  color: rgb(var(--cl-t-primary));
  border-color: rgba(var(--cl-accent), 0.4);
}

.nexus-theme .so-preset.is-on {
  background: rgb(var(--cl-accent));
  border-color: rgb(var(--cl-accent));
  color: rgb(var(--cl-on-accent));
}

.nexus-theme .so-preset:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.nexus-theme .so-limits {
  margin-top: 10px;
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(var(--cl-t-primary), 0.45);
  font-variant-numeric: tabular-nums;
}

/* ── Sag sutun: ozet ─────────────────────────────────────────────────── */

.nexus-theme .so-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border-top: var(--border-w) solid var(--cl-border);
  background: rgba(var(--cl-background), 0.45);
}

@media (min-width: 880px) {
  .nexus-theme .so-side {
    border-top: 0;
    border-left: var(--border-w) solid var(--cl-border);
    padding: 24px 26px;
  }
}

.nexus-theme .so-preview {
  position: relative;
  padding: 16px 18px 14px;
  border: var(--border-w) solid var(--cl-border);
  border-radius: var(--radius-card);
  background: rgba(var(--cl-surface), 0.9);
  overflow: hidden;
}

.nexus-theme .so-preview::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--so-brand);
  opacity: 0.09;
}

.nexus-theme .so-preview > * { position: relative; }

.nexus-theme .so-preview__label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(var(--cl-t-primary), 0.5);
}

.nexus-theme .so-preview__amount {
  margin-top: 2px;
  font-family: var(--ff-heading);
  font-size: clamp(30px, 5vw, 40px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
  color: rgb(var(--cl-t-primary));
  font-variant-numeric: tabular-nums;
}

.nexus-theme .so-preview__svc {
  margin-top: 3px;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(var(--cl-t-primary), 0.6);
}

.nexus-theme .so-bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 64px;
  margin-top: 16px;
}

.nexus-theme .so-bar {
  flex: 1;
  height: var(--so-h, 20%);
  min-height: 4px;
  border-radius: 3px;
  background-image: var(--so-brand);
  transition: height var(--dur, 200ms) var(--ease, ease);
}

.nexus-theme .so-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.nexus-theme .so-total__label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(var(--cl-t-primary), 0.5);
}

.nexus-theme .so-total__value {
  font-family: var(--ff-heading);
  font-size: clamp(24px, 3.4vw, 30px);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: rgb(var(--cl-t-primary));
  font-variant-numeric: tabular-nums;
}

.nexus-theme .so-perks {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.nexus-theme .so-perk {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: rgba(var(--cl-t-primary), 0.68);
}

.nexus-theme .so-perk svg {
  flex: none;
  width: 14px;
  height: 14px;
  color: rgb(var(--cl-success));
}

.nexus-theme .so-add {
  width: 100%;
  padding: 14px 20px;
  border-radius: var(--radius-button);
  background-image: var(--so-brand);
  color: rgb(var(--cl-on-accent));
  font-size: 14px;
  font-weight: 800;
  box-shadow: var(--shadow-button);
  transition: transform var(--dur, 200ms) var(--ease, ease), opacity var(--dur, 200ms) var(--ease, ease);
}

.nexus-theme .so-add:hover:not(:disabled) { transform: translateY(-2px); }
.nexus-theme .so-add:active:not(:disabled) { transform: scale(0.985); }

.nexus-theme .so-add:disabled {
  background-image: none;
  background-color: rgba(var(--cl-t-primary), 0.1);
  color: rgba(var(--cl-t-primary), 0.45);
  box-shadow: none;
  cursor: not-allowed;
}

/* Stok yoksa sebebi yazili olmali; dugmenin pasif olmasi tek basina yetmez. */
.nexus-theme .so-error {
  font-size: 12px;
  line-height: 1.5;
  color: rgb(var(--cl-error));
}

.nexus-theme .so-error[hidden] { display: none; }

/* ── Hareket kisitli mod ─────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .nexus-theme .so-modal__overlay,
  .nexus-theme .so-modal__panel,
  .nexus-theme .so-bar,
  .nexus-theme .so-svc__tick,
  .nexus-theme .so-add {
    transition: none;
  }

  .nexus-theme .so-modal__panel {
    transform: none;
  }

  .nexus-theme .so-add:hover:not(:disabled),
  .nexus-theme .so-add:active:not(:disabled) {
    transform: none;
  }
}