/* 코딩두잇 알림창(SweetAlert2) 공통 디자인
   마이페이지 "쿠폰/코딩머니 내역" 팝업(resources/member/mypage.css 의 .mp-modal)과 같은 모양으로 맞춤.
   - 연결: WEB-INF/common/header.jsp(리뉴얼 화면), WEB-INF/common/pageHeader.jsp(기존 화면)
   - 관리자(adminHeader.jsp)에는 연결하지 않음
   - 토스트(.swal2-toast)는 그대로 두고 일반 알림창(.swal2-modal)만 바꿈
   - 동작(확인/취소 콜백, then)은 건드리지 않고 모양만 바꿈 */

/* 배경 */
.swal2-container { padding: 16px; }
.swal2-container.swal2-backdrop-show { background: rgba(17, 24, 39, .45); }

/* 상자 */
.swal2-container .swal2-modal {
  width: min(100%, 440px);
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .2);
  font-family: "Pretendard", "Noto Sans KR", -apple-system, "Malgun Gothic", sans-serif;
  color: #374151;
  overflow: hidden;
}

/* 닫기(×) 버튼 (showCloseButton 을 쓴 알림창에만 나옴) */
.swal2-container .swal2-modal .swal2-close {
  width: 40px; height: 40px;
  margin: 14px 14px -54px 0;
  border-radius: 10px;
  font-family: inherit; font-size: 26px; line-height: 1;
  color: #4b5563;
  box-shadow: none;
}
.swal2-container .swal2-modal .swal2-close:hover { background: var(--soft, #f3f8fd); color: #4b5563; transform: none; }
.swal2-container .swal2-modal .swal2-close:focus-visible { outline: 2px solid var(--blue, #1166f0); outline-offset: 2px; box-shadow: none; }

/* 아이콘: 작게, 왼쪽 정렬 */
.swal2-container .swal2-modal .swal2-icon {
  font-size: 9px;
  margin: 26px 24px 0;
  justify-self: start;
}
.swal2-container .swal2-modal .swal2-image { margin: 24px 24px 0; max-width: calc(100% - 48px); justify-self: start; }

/* 제목 (swalert 는 문구를 제목에 넣음) */
.swal2-container .swal2-modal .swal2-title {
  margin: 0;
  padding: 26px 24px 0;
  font-family: inherit;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: -.3px;
  color: var(--title, #121a2f);
  text-align: left;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
/* 기존 swalert 가 제목 안에 넣는 <div style="font-size:20px;font-weight:bold"> 크기를 통일 */
.swal2-container .swal2-modal .swal2-title [style] { font-size: inherit !important; font-weight: inherit !important; }
.swal2-container .swal2-modal .swal2-icon:not([style*="none"]) ~ .swal2-title { padding-top: 14px; }
.swal2-container .swal2-modal .swal2-close:not([style*="none"]) ~ .swal2-title { padding-right: 60px; }

/* 본문 */
.swal2-container .swal2-modal .swal2-html-container {
  margin: 8px 24px 0;
  padding: 0;
  font-size: 15.5px;
  line-height: 1.65;
  color: #4b5563;
  text-align: left;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
/* 제목 없이 본문(text)만 있는 알림창은 본문을 제목처럼 */
.swal2-container .swal2-modal .swal2-title[style*="none"] + .swal2-html-container {
  margin-top: 26px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.55;
  color: var(--title, #121a2f);
}
.swal2-container .swal2-modal .swal2-icon:not([style*="none"]) ~ .swal2-title[style*="none"] + .swal2-html-container { margin-top: 14px; }
.swal2-container .swal2-modal .swal2-close:not([style*="none"]) ~ .swal2-title[style*="none"] + .swal2-html-container { padding-right: 36px; }

/* 입력창 */
.swal2-container .swal2-modal .swal2-input,
.swal2-container .swal2-modal .swal2-file,
.swal2-container .swal2-modal .swal2-textarea,
.swal2-container .swal2-modal .swal2-select {
  width: auto;
  max-width: none;
  margin: 14px 24px 0;
  border: 1px solid #cfd8e6;
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
  font-family: inherit;
  font-size: 15px;
  color: var(--title, #121a2f);
}
.swal2-container .swal2-modal .swal2-input { height: 46px; padding: 0 14px; }
.swal2-container .swal2-modal .swal2-textarea { min-height: 110px; padding: 12px 14px; }
.swal2-container .swal2-modal .swal2-select { height: 46px; padding: 0 12px; }
.swal2-container .swal2-modal .swal2-input:focus,
.swal2-container .swal2-modal .swal2-file:focus,
.swal2-container .swal2-modal .swal2-textarea:focus,
.swal2-container .swal2-modal .swal2-select:focus { border-color: var(--blue, #1166f0); box-shadow: 0 0 0 3px rgba(17, 102, 240, .15); outline: 0; }
.swal2-container .swal2-modal .swal2-input.swal2-inputerror,
.swal2-container .swal2-modal .swal2-textarea.swal2-inputerror { border-color: #b42318 !important; box-shadow: 0 0 0 3px rgba(180, 35, 24, .12) !important; }
.swal2-container .swal2-modal .swal2-input-label { margin: 18px 24px 0; justify-content: flex-start; font-size: 15px; font-weight: 700; color: #374151; }
.swal2-container .swal2-modal .swal2-radio,
.swal2-container .swal2-modal .swal2-checkbox { margin: 14px 24px 0; background: transparent; font-size: 15px; }
.swal2-container .swal2-modal .swal2-validation-message {
  margin: 10px 24px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fef3f2;
  font-size: 14px;
  font-weight: 600;
  color: #b42318;
  justify-content: flex-start;
}
.swal2-container .swal2-modal .swal2-validation-message::before { background-color: #b42318; }

/* 버튼 줄 (마이페이지 팝업 아래쪽처럼 줄을 긋고 오른쪽 정렬) */
.swal2-container .swal2-modal .swal2-actions {
  box-sizing: border-box;
  width: 100%;
  margin: 24px 0 0;
  padding: 14px 24px;
  border-top: 1px solid var(--line, #e6ebf2);
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 8px;
}
.swal2-container .swal2-modal .swal2-styled {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 88px;
  height: 42px;
  margin: 0;
  padding: 0 18px;
  border: 1px solid #cfd8e6;
  border-radius: 12px;
  background: #fff;
  background-image: none;
  box-shadow: none;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  color: #374151;
  transition: .15s;
}
.swal2-container .swal2-modal .swal2-styled:focus { box-shadow: none; outline: 0; }
.swal2-container .swal2-modal .swal2-styled:focus-visible { box-shadow: none; outline: 2px solid var(--blue, #1166f0); outline-offset: 2px; }
.swal2-container .swal2-modal .swal2-actions:not(.swal2-loading) .swal2-styled:hover,
.swal2-container .swal2-modal .swal2-actions:not(.swal2-loading) .swal2-styled:active { background-image: none; border-color: var(--blue, #1166f0); color: var(--blue, #1166f0); }

/* 확인 = 파란 버튼 */
.swal2-container .swal2-modal .swal2-styled.swal2-confirm { border-color: var(--blue, #1166f0); background-color: var(--blue, #1166f0); color: #fff; }
.swal2-container .swal2-modal .swal2-actions:not(.swal2-loading) .swal2-styled.swal2-confirm:hover { border-color: var(--blue-d, #0b55d0); background-color: var(--blue-d, #0b55d0); color: #fff; }
/* 예전 기본색(#3085d6 확인, #d33 취소)을 넣은 호출은 새 색으로. 다른 색(예: 삭제용 빨강)은 그대로 둠 */
.swal2-container .swal2-modal .swal2-styled.swal2-confirm[style*="rgb(48, 133, 214)"] { border-color: var(--blue, #1166f0) !important; background-color: var(--blue, #1166f0) !important; }
.swal2-container .swal2-modal .swal2-actions:not(.swal2-loading) .swal2-styled.swal2-confirm[style*="rgb(48, 133, 214)"]:hover { border-color: var(--blue-d, #0b55d0) !important; background-color: var(--blue-d, #0b55d0) !important; }
.swal2-container .swal2-modal .swal2-styled.swal2-confirm[style*="background-color"]:not([style*="rgb(48, 133, 214)"]) { border-color: transparent; }

/* 취소·거절 = 흰 버튼, 확인 왼쪽에 */
.swal2-container .swal2-modal .swal2-styled.swal2-cancel,
.swal2-container .swal2-modal .swal2-styled.swal2-deny { order: -1; }
.swal2-container .swal2-modal .swal2-styled.swal2-cancel[style*="rgb(221, 51, 51)"],
.swal2-container .swal2-modal .swal2-styled.swal2-cancel[style*="rgb(110, 120, 129)"] { background-color: #fff !important; }

.swal2-container .swal2-modal .swal2-loader { border-color: var(--blue, #1166f0) transparent var(--blue, #1166f0) transparent; }

/* 아래 안내(footer) */
.swal2-container .swal2-modal .swal2-footer {
  margin: 0;
  padding: 12px 24px;
  border-top: 1px solid var(--line, #e6ebf2);
  font-size: 14px;
  color: var(--muted, #6b7280);
  justify-content: flex-start;
}
.swal2-container .swal2-modal .swal2-actions + .swal2-footer { border-top-color: #f0f3f7; }

/* 휴대폰: 버튼을 가로로 꽉 차게 (마이페이지 팝업과 같음) */
@media (max-width: 760px) {
  .swal2-container .swal2-modal .swal2-icon { margin: 22px 16px 0; }
  .swal2-container .swal2-modal .swal2-image { margin: 20px 16px 0; max-width: calc(100% - 32px); }
  .swal2-container .swal2-modal .swal2-title { padding: 22px 16px 0; font-size: 18px; }
  .swal2-container .swal2-modal .swal2-icon:not([style*="none"]) ~ .swal2-title { padding-top: 12px; }
  .swal2-container .swal2-modal .swal2-close:not([style*="none"]) ~ .swal2-title { padding-right: 56px; }
  .swal2-container .swal2-modal .swal2-close { margin: 10px 10px -50px 0; }
  .swal2-container .swal2-modal .swal2-html-container { margin: 8px 16px 0; font-size: 15px; }
  .swal2-container .swal2-modal .swal2-title[style*="none"] + .swal2-html-container { margin-top: 22px; font-size: 16.5px; }
  .swal2-container .swal2-modal .swal2-icon:not([style*="none"]) ~ .swal2-title[style*="none"] + .swal2-html-container { margin-top: 12px; }
  .swal2-container .swal2-modal .swal2-input,
  .swal2-container .swal2-modal .swal2-file,
  .swal2-container .swal2-modal .swal2-textarea,
  .swal2-container .swal2-modal .swal2-select { margin: 12px 16px 0; }
  .swal2-container .swal2-modal .swal2-input-label,
  .swal2-container .swal2-modal .swal2-radio,
  .swal2-container .swal2-modal .swal2-checkbox,
  .swal2-container .swal2-modal .swal2-validation-message { margin-left: 16px; margin-right: 16px; }
  .swal2-container .swal2-modal .swal2-actions { margin-top: 20px; padding: 12px 16px; }
  .swal2-container .swal2-modal .swal2-styled { flex: 1 1 0; min-width: 0; height: 48px; padding: 0 10px; }
  .swal2-container .swal2-modal .swal2-footer { padding: 12px 16px; }
}
