/* modals.css — .modal-backdrop, 모든 빌더/고객사이트 모달 */

/* ===== PREVIEW MODAL (customer-site) ===== */
/* ===== PREVIEW MODAL (customer-site, pinned to visible preview column) ===== */
.ps-modal-backdrop {
  position: fixed;
  top: var(--topbar-h);
  left: var(--panel-l);
  right: var(--panel-r);
  bottom: 0;
  background: rgba(15, 23, 42, .55);           /* 표준 scrim */
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  display: none;
  align-items: center; justify-content: center;
  padding: 20px 16px;
  z-index: 150;
  animation: fadeIn .25s;
}
.builder:has(.panel-r.panel-r-collapsed) .ps-modal-backdrop { right: 0; }
.ps-modal-backdrop.show { display: flex; }


/* ===== SECTION PICKER MODAL ===== */
/* ===== SECTION PICKER MODAL ===== */
.modal.section-picker { max-width: 560px; }
.section-picker .modal-body { padding: 4px 16px 16px; max-height: 60vh; overflow-y: auto; }
.section-picker-empty {
  padding: 24px 12px;
  font-size: 12.5px;
  color: var(--text-3);
  text-align: center;
}


/* ===== 카드 편집 모달 ===== */
/* === 카드 편집 모달 === */
.card-edit-image {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  align-items: start;
}
.card-edit-image-preview {
  width: 140px; height: 105px;
  border-radius: 8px;
  background-size: cover; background-position: center;
  background-color: var(--surface-3);
  border: 1px solid var(--border);
}
.card-edit-image-preview.empty {
  background-image: linear-gradient(45deg, #F1F5F9 25%, transparent 25%, transparent 75%, #F1F5F9 75%),
                    linear-gradient(45deg, #F1F5F9 25%, transparent 25%, transparent 75%, #F1F5F9 75%);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
  background-color: #FAFAFA;
}
.card-edit-image-controls { display: flex; flex-direction: column; gap: 8px; }
.card-edit-image-actions { display: flex; gap: 6px; }
.card-edit-upload {
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer;
}
.card-edit-upload svg { width: 14px; height: 14px; }


/* ===== 빌더 공용 MODAL (publish/addPage/newSite/...) ===== */
/* ===== MODAL ===== */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, .55);           /* 표준 scrim */
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  z-index: 200;
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn .25s;
}
.modal-backdrop.show { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(20,24,26,.20);
  width: 100%; max-width: 480px;
  overflow: hidden;
  animation: slideUp .25s cubic-bezier(.4,.2,.2,1);
}
@keyframes slideUp { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { padding: 20px 24px 12px; }
.modal-title { font-size: 16px; font-weight: 800; letter-spacing: -.02em; color: var(--text-1); margin-bottom: 4px; }
.modal-sub { font-size: 12.5px; color: var(--text-2); }
.modal-body { padding: 8px 24px 16px; }
.check-list {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.check-row {
  display: flex; align-items: start; gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 12.5px;
}
.check-row:last-child { border-bottom: none; }
.check-icon {
  width: 16px; height: 16px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.check-icon.ok { background: var(--status-live-bg); color: var(--status-live); }
.check-icon.warn { background: var(--status-draft-bg); color: var(--status-draft); }
.check-icon svg { width: 9px; height: 9px; }
.check-content { flex: 1; }
.check-content strong { font-weight: 600; color: var(--text-1); display: block; margin-bottom: 2px; }
.check-content span { color: var(--text-3); font-size: 11.5px; }
.modal-footer {
  padding: 16px 24px 20px;
  background: var(--surface-2);
  border-top: 1px solid var(--border-soft);
  display: flex; justify-content: flex-end; gap: 8px;
}

/* 발행 모달 — base64 임시 이미지 경고 */
.publish-warn {
  margin: 4px 24px 6px;
  padding: 12px 14px;
  background: var(--status-error-bg);
  border: 1px solid rgba(185,28,28,.25);
  border-radius: 8px;
}
.publish-warn-title { font-size: 12.5px; font-weight: 700; color: var(--status-error); margin-bottom: 4px; }
.publish-warn-desc { font-size: 11.5px; color: var(--text-2); line-height: var(--lh-normal); margin-bottom: 6px; }
.publish-warn-list { margin: 0; padding-left: 16px; font-size: 11px; color: var(--text-2); line-height: var(--lh-relaxed); max-height: 120px; overflow-y: auto; }
.publish-warn-list b { color: var(--text-1); }

/* tooltip */
.tooltip { position: relative; }
.tooltip:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%; transform: translateX(-50%);
  background: var(--text-1); color: #fff;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
  z-index: 30;
  pointer-events: none;
  font-weight: 500;
}

.empty-props { padding: 32px 16px; text-align: center; color: var(--text-3); }
.empty-props svg { width: 28px; height: 28px; margin-bottom: 8px; color: var(--text-4); }
.empty-props-title { font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 4px; }
.empty-props-msg { font-size: 11.5px; line-height: var(--lh-normal); max-width: 240px; margin: 0 auto; }

