/* ads_banner — placard 표준형 위 배너 전용 additive CSS */

/* ── 목록: 빠른보기·모달 ── */
.pl-wrap .bn-card-imgbtn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  cursor: zoom-in;
  background: repeating-conic-gradient(#f2f4f8 0% 25%, #e9edf3 0% 50%) 50% / 22px 22px;
  position: relative;
}
.pl-wrap .bn-card-imgbtn img {
  object-fit: contain;
  background: transparent;
}
.pl-wrap .bn-quick {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: rgba(15, 23, 42, .46);
  color: #fff;
  font-weight: 700;
  opacity: 0;
  transition: opacity .18s;
  pointer-events: none;
}
.pl-wrap .bn-card-imgbtn:hover .bn-quick,
.pl-wrap .bn-card-imgbtn:focus-visible .bn-quick {
  opacity: 1;
}
.pl-wrap .bn-card-img-ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 120px;
  color: #fff;
  font-size: var(--fs-sm, 15px);
  font-weight: 600;
}
.pl-wrap .bn-card-img-ph i {
  font-size: 28px;
}

.bn-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.bn-modal[hidden] { display: none; }
.bn-modal-ov {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 30, .62);
  backdrop-filter: blur(2px);
}
.bn-modal-box {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: 16px;
  max-width: 760px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .4);
  animation: bnPop .18s ease;
}
@keyframes bnPop {
  from { transform: translateY(14px) scale(.98); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.bn-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: rgba(15, 23, 42, .55);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bn-modal-img {
  width: 100%;
  background: repeating-conic-gradient(#f2f4f8 0% 25%, #e9edf3 0% 50%) 50% / 22px 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px 16px 0 0;
  min-height: 200px;
  max-height: 54vh;
  overflow: hidden;
}
.bn-modal-img img {
  max-width: 100%;
  max-height: 54vh;
  object-fit: contain;
  display: block;
}
.bn-modal-body { padding: 20px 24px 24px; }
.bn-modal-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.bn-modal-badges span {
  font-size: var(--fs-xs, 14px);
  font-weight: 700;
  border-radius: 99px;
  padding: 3px 11px;
}
.bn-b-active { background: #dcfce7; color: #15803d; }
.bn-b-upcoming { background: #fef3c7; color: #b45309; }
.bn-b-ended { background: #eef0f4; color: #64748b; }
.bn-b-type { background: #eef0ff; color: #4338ca; }
.bn-b-theme { background: #eff6ff; color: #1d4ed8; }
.bn-modal-title {
  font-size: var(--fs-xl, 20px);
  font-weight: 800;
  color: #161a26;
  margin: 2px 0 6px;
  line-height: 1.35;
}
.bn-modal-org {
  color: #5b6270;
  font-size: var(--fs-sm, 15px);
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 14px;
}
.bn-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: #5b6270;
  font-size: var(--fs-sm, 15px);
  margin-bottom: 14px;
}
.bn-modal-meta i { color: #9aa0ab; width: 15px; text-align: center; }
.bn-modal-desc {
  color: #3c424f;
  font-size: var(--fs-sm, 15px);
  line-height: 1.65;
  white-space: pre-line;
  border-top: 1px solid #eef0f4;
  padding-top: 14px;
  margin-bottom: 18px;
  max-height: 240px;
  overflow: auto;
}
.bn-modal-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.bn-modal-acts a {
  flex: 1 1 auto;
  text-align: center;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  min-width: 140px;
}
.bn-act-link { background: #10b981; color: #fff; }
.bn-act-detail { background: #6366f1; color: #fff; }

/* ── 목록: CTA ── */
.bn-promote-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #eef0ff, #f6f7ff);
  border: 1px solid #d9ddff;
  border-radius: 10px;
  padding: 14px 18px;
  margin: 0 0 16px;
}

/* ── 폼: 배너 유형 라디오 ── */
.bn-type-grid { display: flex; flex-direction: column; gap: 8px; }
.bn-type-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.bn-type-item:has(input:checked) {
  border-color: var(--pub-accent, #1a73e8);
  background: #eff6ff;
}
.bn-type-item input[type=radio] {
  margin-top: 2px;
  accent-color: var(--pub-accent, #1a73e8);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.bn-type-info { display: flex; flex-direction: column; gap: 2px; }
.bn-type-label { font-size: var(--fs-sm, 15px); font-weight: 600; color: #1e293b; }
.bn-type-desc { font-size: var(--fs-sm, 15px); color: #64748b; }

/* ── 폼: 이미지 업로드 미리보기 ── */
.bn-upload-preview { display: none; margin-top: 12px; text-align: center; }
.bn-upload-preview img {
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  object-fit: contain;
}
.bn-preview-landscape img { max-width: 100%; height: auto; max-height: 200px; }
.bn-preview-portrait img { max-width: 200px; height: auto; }
.bn-preview-square img { width: 200px; height: 200px; object-fit: cover; }
.bn-preview-custom img,
.bn-preview-text_line img { max-width: 100%; height: auto; max-height: 200px; }
.bn-existing-img { margin-bottom: 10px; }
.bn-existing-img img {
  max-width: 100%;
  max-height: 160px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}
.bn-dim-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bn-dim-group .pw-input { width: 120px; flex: none; }
.bn-dim-unit { font-size: var(--fs-sm, 15px); color: #64748b; }

@media (min-width: 768px) {
  .bn-type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
}
@media (max-width: 560px) {
  .bn-modal-acts a { flex: 1 1 100%; }
}

/* ── 상세: 배너 뷰어·정보 박스 ── */
.bnd-viewer { background: #1e293b; padding: 24px 16px; margin-bottom: 18px; border-radius: 12px; }
.bnd-viewer-inner { width: 100%; box-sizing: border-box; }
.bnd-viewer-label {
  font-size: var(--fs-sm, 15px);
  color: #94a3b8;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.bnd-viewer-frame {
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: zoom-in;
  position: relative;
}
.bnd-viewer-frame img {
  border-radius: 6px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .4);
}
.bnd-viewer-landscape img { max-width: 100%; height: auto; max-height: 300px; }
.bnd-viewer-portrait img { max-width: 300px; height: auto; }
.bnd-viewer-square img { max-width: 400px; max-height: 400px; width: 100%; }
.bnd-viewer-custom img { max-width: 100%; height: auto; max-height: 360px; }
.bnd-viewer-zoom {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, .6);
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: var(--fs-xs, 14px);
  pointer-events: none;
}
.bnd-viewer-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #64748b;
  padding: 40px 0;
  font-size: var(--fs-sm, 15px);
}
.bnd-viewer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #334155;
}
.bnd-viewer-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm, 15px);
  color: #94a3b8;
}
.bnd-infobox {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 18px;
}
.bnd-infobox-header {
  padding: 14px 18px;
  font-size: var(--fs-sm, 15px);
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #f1f5f9;
}
.bnd-infobox-row {
  display: flex;
  padding: 11px 18px;
  border-bottom: 1px solid #f8fafc;
  gap: 12px;
}
.bnd-infobox-row:last-child { border-bottom: none; }
.bnd-inforow-label {
  min-width: 100px;
  font-size: var(--fs-sm, 15px);
  font-weight: 500;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.bnd-inforow-val {
  font-size: var(--fs-base, 16px);
  font-weight: 600;
  color: #0f172a;
  word-break: break-word;
  line-height: 1.6;
}
.bnd-link-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.bnd-content-box {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 18px;
}
.bnd-content-body {
  padding: 18px;
  font-size: var(--fs-sm, 15px);
  color: #334155;
  line-height: 1.75;
  white-space: pre-line;
}
.bnd-prevnext {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 18px;
}
.bnd-pn-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  text-decoration: none;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
  font-size: var(--fs-sm, 15px);
}
.bnd-pn-item:last-child { border-bottom: none; }
.bnd-pn-item:hover { background: #f8fafc; }
.bnd-pn-dir {
  min-width: 52px;
  color: #94a3b8;
  font-size: var(--fs-sm, 15px);
  display: flex;
  align-items: center;
  gap: 4px;
}
.bnd-pn-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bnd-sidebar-box {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 16px;
}
.bnd-sidebar-header {
  padding: 12px 16px;
  font-size: var(--fs-sm, 15px);
  font-weight: 700;
  color: #1e293b;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.bnd-rel-item {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  text-decoration: none;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
}
.bnd-rel-item:hover { background: #f8fafc; }
.bnd-rel-thumb {
  width: 60px;
  height: 40px;
  overflow: hidden;
  border-radius: 4px;
  background: #f1f5f9;
  flex-shrink: 0;
}
.bnd-rel-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bnd-rel-title {
  font-size: var(--fs-sm, 15px);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bnd-rel-meta { font-size: var(--fs-sm, 15px); color: #94a3b8; }
#bndLightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .85);
  z-index: 9000;
  align-items: center;
  justify-content: center;
}
#bndLightbox.open { display: flex; }
#bndLightboxImg { max-width: 92vw; max-height: 88vh; border-radius: 6px; }
#bndLightboxClose {
  position: absolute;
  top: 16px;
  right: 20px;
  background: rgba(255, 255, 255, .15);
  border: none;
  color: #fff;
  font-size: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
}
#bnPwModal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 8000;
  align-items: center;
  justify-content: center;
}
#bnPwModal.open { display: flex; }
.bn-pw-modal-box {
  background: #fff;
  border-radius: 14px;
  padding: 32px 28px;
  max-width: 380px;
  width: 90%;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .2);
}
.bn-pw-modal-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: var(--fs-sm, 15px);
  box-sizing: border-box;
  margin-bottom: 14px;
}
.bn-pw-modal-submit,
.bn-pw-modal-cancel {
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-size: var(--fs-sm, 15px);
  font-weight: 700;
  cursor: pointer;
}
.bn-pw-modal-submit { background: #1a73e8; color: #fff; }
.bn-pw-modal-cancel { background: #f1f5f9; color: #475569; font-weight: 600; }
