/**
 * Zyron CRM — Neon Tabela Hesaplayıcı Stilleri
 * ───────────────────────────────────────────────────────────────────────────
 * Ortak calc layout class'ları (.lb-*, .dvk-preview-card) paylaşılır.
 * Burada sadece neon'a özgü görseller: renk seçici, canlı önizleme (glow +
 * sahneler), sepet thumb, teklif print blokları.
 *
 * Prefix: nt-
 */

/* ─── Renk seçici (swatch grid) ─────────────────────────────────────────── */

.nt-color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.nt-color-swatch {
  --nt-sw: #fff;
  display: flex; align-items: center; gap: 7px;
  padding: 7px 9px;
  background: #0f1117; border: 1px solid #232734; border-radius: 9px;
  cursor: pointer; transition: border-color .15s, transform .1s;
}
.nt-color-swatch:hover { transform: translateY(-1px); border-color: #3a4150; }
.nt-color-swatch.is-active {
  border-color: var(--nt-sw);
  box-shadow: 0 0 0 1px var(--nt-sw), 0 0 12px -2px var(--nt-sw);
}
.nt-color-swatch__dot {
  width: 16px; height: 16px; border-radius: 50%; flex: none;
  background: var(--nt-sw);
  box-shadow: 0 0 6px 1px var(--nt-sw), 0 0 12px 2px var(--nt-sw);
}
.nt-color-swatch__label {
  font-size: 11.5px; font-weight: 600; color: #cdd3df;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ─── Canlı Önizleme ────────────────────────────────────────────────────── */

.nt-prev {
  --nt-glow: #fff;
  position: relative;
  width: 100%; aspect-ratio: 16 / 10;
  border-radius: 10px; overflow: hidden;
  background: #060608;
  display: grid; place-items: center;
  user-select: none;
}

/* ── Sahne arka planları (duvar dokuları) ── */
.nt-prev__scene { position: absolute; inset: 0; z-index: 0; }

/* Zemin düzlemi (oda derinliği — duvar/yer ayrımı) */
.nt-prev__scene::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 27%;
  background:
    linear-gradient(180deg, rgba(0,0,0,.28) 0%, rgba(0,0,0,.5) 100%);
  border-top: 1px solid rgba(255,255,255,.05);
  box-shadow: 0 -1px 6px rgba(0,0,0,.4);
  pointer-events: none;
}
/* Vinyet — kenarları karart, fotoğrafik derinlik (en büyük realism kazancı) */
.nt-prev__scene::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(115% 95% at 50% 42%, transparent 48%, rgba(0,0,0,.62) 100%);
  box-shadow: inset 0 0 60px 14px rgba(0,0,0,.45);
}

/* Karanlık oda — derinlikli koyu stüdyo duvarı */
.nt-prev--dark .nt-prev__scene {
  background:
    radial-gradient(80% 60% at 50% 30%, rgba(40,44,58,.4), transparent 70%),
    linear-gradient(180deg, #14161e 0%, #0c0d13 50%, #070709 100%);
}
/* Izgara/mesh duvar — ince, perspektifli yumuşak çizgiler */
.nt-prev--grid .nt-prev__scene {
  background-color: #0a0c11;
  background-image:
    radial-gradient(90% 70% at 50% 32%, rgba(40,48,66,.45), transparent 72%),
    repeating-linear-gradient(0deg,  rgba(130,142,165,.10) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, rgba(130,142,165,.10) 0 1px, transparent 1px 40px),
    linear-gradient(180deg, #11141c, #07080c);
}
/* Beyaz fayans — yumuşak grout, hafif gri ton */
.nt-prev--tile .nt-prev__scene {
  background-color: #c4c9d0;
  background-image:
    radial-gradient(85% 65% at 50% 32%, rgba(255,255,255,.16), transparent 70%),
    linear-gradient(rgba(26,28,36,.30), rgba(14,16,22,.48)),
    repeating-linear-gradient(0deg,  rgba(120,126,138,.4) 0 1.5px, transparent 1.5px 48px),
    repeating-linear-gradient(90deg, rgba(120,126,138,.4) 0 1.5px, transparent 1.5px 48px),
    linear-gradient(180deg, #d2d6dc, #b3b9c1);
}
/* Tuğla duvar — yumuşatılmış, sıcak ton */
.nt-prev--brick .nt-prev__scene {
  background-color: #241d1a;
  background-image:
    radial-gradient(85% 65% at 50% 34%, rgba(74,54,40,.5), transparent 72%),
    linear-gradient(rgba(0,0,0,.5), rgba(0,0,0,.72)),
    repeating-linear-gradient(0deg, #362b26 0 27px, #241b17 27px 29px),
    repeating-linear-gradient(90deg, #362b26 0 60px, #241b17 60px 64px);
  background-blend-mode: normal, normal, multiply, multiply;
}

/* ── Ambient wash — neon renginin duvara yayılması (EN ÖNEMLİ realism) ── */
.nt-prev__ambient {
  position: absolute; inset: -25%; z-index: 1;
  background: radial-gradient(46% 42% at 50% 46%, var(--nt-glow), transparent 70%);
  opacity: .55; mix-blend-mode: screen; filter: blur(34px);
  pointer-events: none;
  animation: nt-blink-amb 6.5s infinite;
}

/* ── Zemin / pleksi ── */
.nt-prev__board {
  position: relative; z-index: 2;
  max-width: 86%; max-height: 76%;
  display: grid; place-items: center;
  padding: 26px 34px;
  border-radius: 9px;
}
/* Şeffaf pleksi — hafif görünür panel + kenar parlaması */
.nt-prev__board--transparent {
  background: linear-gradient(135deg, rgba(255,255,255,.07), rgba(255,255,255,.012) 40%, rgba(255,255,255,.05));
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.14),
    inset 0 1px 0 rgba(255,255,255,.18),
    0 10px 34px -12px rgba(0,0,0,.5);
  backdrop-filter: blur(1px);
}
.nt-prev__board--black {
  background: linear-gradient(135deg, #14151a, #0a0a0d);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 12px 30px -12px rgba(0,0,0,.85);
}
.nt-prev__board--cut { background: transparent; padding: 14px 16px; }
.nt-prev__board--wood {
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.12) 0 5px, transparent 5px 11px),
    linear-gradient(180deg, #7a5532, #4f3520);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.3), 0 12px 28px -12px rgba(0,0,0,.85);
  border-radius: 6px;
}

/* Köşe montaj vidaları (panel'li zeminlerde) */
.nt-prev__screw {
  position: absolute; width: 7px; height: 7px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f4f6fa, #9aa1ad 60%, #5b626e);
  box-shadow: 0 1px 2px rgba(0,0,0,.5), inset 0 0 1px rgba(0,0,0,.4);
  z-index: 3;
}
.nt-prev__screw--tl { top: 7px;    left: 7px; }
.nt-prev__screw--tr { top: 7px;    right: 7px; }
.nt-prev__screw--bl { bottom: 7px; left: 7px; }
.nt-prev__screw--br { bottom: 7px; right: 7px; }

/* ── Neon TÜP yazı — beyaz çekirdek + yoğun renkli bloom ── */
.nt-prev__neon {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: .12em;
  text-align: center; line-height: 1.06;
  font-family: var(--nt-font, inherit);
  color: #fff;
  font-weight: 600; letter-spacing: .5px;
  -webkit-text-stroke: 0.6px rgba(255,255,255,.55);
  text-shadow:
    0 0 1px #fff,
    0 0 2px #fff,
    0 0 4px var(--nt-glow),
    0 0 9px var(--nt-glow),
    0 0 18px var(--nt-glow),
    0 0 32px var(--nt-glow),
    0 0 52px var(--nt-glow),
    0 0 78px var(--nt-glow);
  animation: nt-blink 6.5s infinite;
}
.nt-prev__neon.is-xl { font-size: clamp(30px, 9.5vw, 66px); }
.nt-prev__neon.is-lg { font-size: clamp(24px, 7.5vw, 52px); }
.nt-prev__neon.is-md { font-size: clamp(19px, 6vw, 42px); }
.nt-prev__neon.is-sm { font-size: clamp(15px, 4.2vw, 31px); }
.nt-prev__line { white-space: nowrap; }

/* ── Aç-kapa (blink) — neon / ambient / floor SENKRON ──
   Gerçek neon: kısa bir idle titreme, sonra tam sönüp birkaç "buzz" ile yeniden yanma.
   Üç eleman aynı zaman çizelgesini farklı baz opaklıklarla paylaşır. */
@keyframes nt-blink { /* neon — baz 1 */
  0%, 17%, 21%, 62%, 100% { opacity: 1; }
  19% { opacity: .82; }                 /* idle titreme */
  64%, 66% { opacity: .12; }            /* SÖN */
  67% { opacity: 1; }                   /* buzz on */
  68% { opacity: .25; }
  69% { opacity: 1; }
  70% { opacity: .45; }
  71% { opacity: 1; }                   /* yerleşti */
}
@keyframes nt-blink-amb { /* ambient wash — baz .55 */
  0%, 17%, 21%, 62%, 100% { opacity: .55; }
  19% { opacity: .42; }
  64%, 66% { opacity: .05; }
  67% { opacity: .55; }
  68% { opacity: .12; }
  69% { opacity: .55; }
  70% { opacity: .24; }
  71% { opacity: .55; }
}
@keyframes nt-blink-floor { /* floor spill — baz .32 */
  0%, 17%, 21%, 62%, 100% { opacity: .32; }
  19% { opacity: .24; }
  64%, 66% { opacity: .03; }
  67% { opacity: .32; }
  68% { opacity: .07; }
  69% { opacity: .32; }
  70% { opacity: .14; }
  71% { opacity: .32; }
}

/* Yere düşen renk yansıması (floor spill) */
.nt-prev__floor {
  position: absolute; left: 0; right: 0; bottom: 0; height: 36%;
  z-index: 1;
  background: radial-gradient(72% 130% at 50% 100%, var(--nt-glow), transparent 64%);
  opacity: .32; mix-blend-mode: screen; filter: blur(16px);
  pointer-events: none;
  animation: nt-blink-floor 6.5s infinite;
}

/* Boş metin placeholder */
.nt-prev__empty {
  position: relative; z-index: 2;
  text-align: center; color: #aeb6c6; max-width: 280px;
}
.nt-prev__empty-icon {
  font-size: 34px; color: #ffd86b;
  text-shadow: 0 0 10px #ffb02e, 0 0 24px #ff8a00;
  margin-bottom: 8px;
}
.nt-prev__empty-title { font-size: 15px; font-weight: 700; color: #e8ecf5; }
.nt-prev__empty-sub { font-size: 12px; line-height: 1.5; margin-top: 4px; }
.nt-prev__empty-strong { color: #ffd86b; font-weight: 600; }

/* Badge + sahne etiketi */
.nt-prev__badge {
  position: absolute; top: 10px; left: 10px; z-index: 4;
  display: flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 20px;
  background: rgba(10,12,18,.72); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.1);
  font-size: 11px; font-weight: 600; color: #e8ecf5;
}
.nt-prev__badge i { color: #ffd86b; }
.nt-prev__badge-dot { width: 3px; height: 3px; border-radius: 50%; background: #64748b; }
.nt-prev__badge-area { color: #9aa3b5; }
.nt-prev__scene-label {
  position: absolute; bottom: 10px; right: 10px; z-index: 4;
  display: flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 16px;
  background: rgba(10,12,18,.6); backdrop-filter: blur(6px);
  font-size: 10.5px; color: #cbd2e0;
}

/* ─── Sepet thumb ───────────────────────────────────────────────────────── */

.nt-cart-thumb {
  --nt-glow: #fff;
  width: 56px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: 8px; background: #0b0d13;
  font-size: 13px; font-weight: 700; color: #fff;
  overflow: hidden; padding: 2px;
  text-shadow: 0 0 4px var(--nt-glow), 0 0 10px var(--nt-glow);
}

/* ─── Teklif/print blokları ─────────────────────────────────────────────── */

.nt-quote-items {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 14px;
}
.nt-quote-item {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px 10px;
  min-width: 220px; flex: 1 1 240px;
}
.nt-quote-item__thumb {
  --nt-glow: #fff;
  width: 70px; height: 48px; flex: none;
  display: grid; place-items: center;
  border-radius: 6px; background: #0b0d13;
  font-size: 13px; font-weight: 700; color: #fff;
  overflow: hidden; padding: 2px;
  text-shadow: 0 0 4px var(--nt-glow), 0 0 10px var(--nt-glow);
}
.nt-quote-item__info { min-width: 0; }
.nt-quote-item__title { font-size: 13px; font-weight: 700; color: #111827; }
.nt-quote-item__sub { font-size: 11px; color: #6b7280; margin-top: 2px; }
.nt-quote-item__price { font-size: 13px; font-weight: 700; color: #d90429; margin-top: 3px; }

@media print {
  .nt-quote-item__thumb, .nt-cart-thumb {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
}

/* ─── Admin (Vitrin > Satış Modülleri) renk/zemin satırları ─────────────── */

.nt-admin-rows { display: flex; flex-direction: column; gap: 6px; }
.nt-admin-row {
  display: grid;
  grid-template-columns: 70px 1fr 56px 80px 32px;
  gap: 6px; align-items: center;
}
.nt-admin-row > input,
.nt-admin-row > select {
  width: 100%; padding: 6px 8px;
  border: 1px solid var(--color-border, #e5e7eb); border-radius: 7px;
  font-size: 12.5px; background: #fff;
}
.nt-admin-row > input[type="color"] {
  padding: 2px; height: 32px; cursor: pointer;
}

/* ─── Storefront renk swatch'ları (/neon-tabela-hesapla) ────────────────── */

.sf-nt-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-nt-swatch {
  --nt-sw: #fff;
  width: 34px; height: 34px; padding: 0; border-radius: 50%;
  border: 2px solid transparent; background: #0f1117;
  display: grid; place-items: center; cursor: pointer;
  transition: transform .1s, border-color .15s;
}
.sf-nt-swatch:hover { transform: scale(1.08); }
.sf-nt-swatch.is-active { border-color: var(--nt-sw); }
.sf-nt-swatch__dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--nt-sw);
  box-shadow: 0 0 6px 1px var(--nt-sw), 0 0 12px 2px var(--nt-sw);
}
