/* แบนเนอร์สไลด์หน้าร้าน: หน้าจัดการของพนักงาน (/shop-banners) */

.bn-intro { margin: -6px 0 16px; font-size: .92rem; }
.bn-count { margin: 0 0 12px; color: var(--muted); font-size: .9rem; }
.bn-count .num { font-weight: 700; color: var(--ink); }

/* ---------- ตัวอย่างสไลด์ (16:7) ---------- */
.bn-slide {
  --bn-bg: var(--brand);
  position: relative;
  aspect-ratio: 16 / 7;
  width: 100%;
  min-width: 0;
  border-radius: 20px;
  overflow: hidden;
  background-color: var(--bn-bg);
  background-image: linear-gradient(135deg, rgba(255,255,255,.14), rgba(0,0,0,.12));
  background-size: cover;
  background-position: center;
  color: #fff;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
}
.bn-slide.has-img::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.25) 55%, rgba(0,0,0,0) 100%),
              linear-gradient(0deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 60%);
}
.bn-slide-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px 14px;
  max-width: 78%;
  min-width: 0;
}
.bn-slide-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0,0,0,.18);
}
.bn-slide-title.ph { opacity: .6; font-weight: 600; }
.bn-slide-sub {
  font-size: .8rem;
  line-height: 1.3;
  opacity: .92;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bn-slide-btn {
  margin-top: 4px;
  display: inline-block;
  max-width: 100%;
  padding: 3px 12px;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ตัวใหญ่ในหน้าต่างแก้ไข */
.bn-preview-wrap { display: flex; flex-direction: column; gap: 6px; }
.bn-preview-label { font-size: .8rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.bn-slide.big .bn-slide-text { padding: 16px 18px; gap: 6px; }
.bn-slide.big .bn-slide-title { font-size: 1.25rem; }
.bn-slide.big .bn-slide-sub { font-size: .9rem; }
.bn-slide.big .bn-slide-btn { font-size: .85rem; padding: 5px 16px; }

@media (min-width: 761px) {
  .bn-slide.big .bn-slide-text { padding: 28px 32px; max-width: 65%; gap: 8px; }
  .bn-slide.big .bn-slide-title { font-size: 1.9rem; }
  .bn-slide.big .bn-slide-sub { font-size: 1.05rem; }
  .bn-slide.big .bn-slide-btn { font-size: .95rem; padding: 8px 20px; margin-top: 8px; }
}

/* ---------- รายการแบนเนอร์ ---------- */
.bn-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
@media (min-width: 761px) {
  .bn-list { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
}
.bn-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.bn-card.dim .bn-slide { opacity: .55; filter: grayscale(.35); }
.bn-info { display: flex; flex-direction: column; gap: 3px; padding: 0 4px; min-width: 0; }
.bn-info-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bn-order { font-weight: 700; color: var(--muted); }
.bn-link { color: var(--muted); overflow-wrap: anywhere; }
.bn-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 4px 2px; }
.bn-actions .btn { flex: 0 0 auto; }
.bn-move { min-width: 40px; }
.bn-del { margin-left: auto; color: var(--danger); }

/* สถานะ */
.bn-st-live { background: var(--ok-soft); color: var(--ok); }
.bn-st-scheduled { background: var(--warn-soft); color: #7a5300; }
.bn-st-ended { background: var(--danger-soft); color: var(--danger); }
.bn-st-off { background: var(--bg); color: var(--muted); border: 1px solid var(--line); }

/* ---------- เลือกสีพื้นหลัง ---------- */
.bn-swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.bn-swatch {
  position: relative;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line);
  cursor: pointer;
  overflow: hidden;
  flex: 0 0 auto;
}
.bn-swatch.brand { background: var(--brand); }
.bn-swatch.brand::after {
  content: "★";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: .85rem;
}
.bn-swatch.on { box-shadow: 0 0 0 2px var(--ink); }
.bn-swatch:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.bn-swatch.custom {
  background: conic-gradient(#f43f5e, #f59e0b, #22c55e, #06b6d4, #6366f1, #d946ef, #f43f5e);
}
.bn-swatch.custom input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.bn-swatch.custom:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }

@media (max-width: 760px) {
  .bn-swatch { width: 40px; height: 40px; }
  .bn-actions .btn.small { min-height: 40px; }
}
