/* ==========================================================================
   BGSK Studio - Enterprise Custom Modal Stylesheet
   규칙 준수:
   - 브라우저 기본 팝업(alert/confirm/prompt) 전면 대체
   - 딥 네이비 & 슬레이트 다크 테마 일체감
   - 단색 무색 아이콘 헤더
   - 버튼/라벨 줄바꿈 일체 금지
   ========================================================================== */

.studio-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.studio-modal-backdrop.is-active {
  opacity: 1;
  pointer-events: auto;
}

.studio-modal-container {
  background: #ffffff;
  width: 100%;
  max-width: 480px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.3), 0 0 0 1px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.studio-modal-backdrop.is-active .studio-modal-container {
  transform: translateY(0) scale(1);
}

.studio-modal-lg {
  max-width: 760px;
}

.studio-modal-xl {
  max-width: 960px;
}

/* Modal Header */
.studio-modal-head {
  padding: 14px 20px;
  background: var(--navy-sidebar);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #131b2e;
}

.studio-modal-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.studio-modal-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  flex-shrink: 0;
}

.studio-modal-icon-danger {
  color: #f87171;
}

.studio-modal-icon-warning {
  color: #fbbf24;
}

.studio-modal-icon-success {
  color: #4ade80;
}

.studio-modal-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
  white-space: nowrap;
}

.studio-modal-close-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: var(--navy-sidebar-text);
  background: transparent;
  transition: all 0.15s ease;
  cursor: pointer;
  flex-shrink: 0;
}
.studio-modal-close-btn:hover {
  background: var(--navy-sidebar-hover);
  color: #ffffff;
}

/* Modal Body */
.studio-modal-body {
  padding: 24px 20px;
  font-size: 13.5px;
  color: var(--text-main);
  line-height: 1.6;
  max-height: calc(85vh - 120px);
  overflow-y: auto;
}

.studio-modal-message {
  margin-bottom: 16px;
  color: #334155;
  font-size: 13.5px;
  word-break: keep-all;
}

.studio-modal-input-wrap {
  margin-top: 12px;
}

.studio-modal-input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.studio-modal-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Modal Foot Actions */
.studio-modal-foot {
  padding: 12px 20px;
  background: #f8fafc;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.studio-modal-btn {
  height: 34px;
  padding: 0 16px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.studio-modal-btn-cancel {
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}
.studio-modal-btn-cancel:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.studio-modal-btn-confirm {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #ffffff;
}
.studio-modal-btn-confirm:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.studio-modal-btn-danger {
  background: var(--danger);
  border: 1px solid var(--danger);
  color: #ffffff;
}
.studio-modal-btn-danger:hover {
  background: var(--danger-hover);
  border-color: var(--danger-hover);
}
