/* ==========================================================================
   리그숙박 공통 모달 (modal.css)
   - alert / confirm / 서버 flash 메시지를 모두 같은 모달 UI로 표시
   - 사이트(ui.css)와 관리자(admin.css) 양쪽에서 사용
   ========================================================================== */
[data-nrh-flash]{display:none!important}
html.nrh-modal-open,
html.nrh-modal-open body{overflow:hidden!important}

.nrh-modal-layer{
  position:fixed;inset:0;z-index:10000;
  display:grid;place-items:center;padding:24px;
  opacity:0;visibility:hidden;
  transition:opacity .18s ease,visibility .18s ease;
}
.nrh-modal-layer[hidden]{display:none}
.nrh-modal-layer.is-open{opacity:1;visibility:visible}
.nrh-modal-scrim{
  position:absolute;inset:0;
  background:rgba(45,37,34,.42);
  -webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);
  opacity:0;transition:opacity .18s ease;
}
.nrh-modal-layer.is-open .nrh-modal-scrim{opacity:1}

.nrh-modal{
  position:relative;width:min(448px,100%);max-height:calc(100vh - 48px);
  overflow:auto;padding:30px 30px 24px;
  border:1px solid rgba(234,219,209,.92);border-radius:24px;
  background:linear-gradient(180deg,#fffdfb 0%,#fdf6f1 100%);
  box-shadow:0 32px 90px rgba(60,35,28,.3),inset 0 1px 0 rgba(255,255,255,.95);
  transform:translateY(12px) scale(.975);
  transition:transform .2s cubic-bezier(.2,.7,.3,1),opacity .18s ease;
  opacity:0;
}
.nrh-modal-layer.is-open .nrh-modal{transform:none;opacity:1}
.nrh-modal::before{
  content:"";position:absolute;left:0;right:0;top:0;height:3px;
  background:linear-gradient(90deg,rgba(215,154,172,0),#d79aac,rgba(215,154,172,0));
  opacity:.85;pointer-events:none;
}
.nrh-modal-icon{
  display:grid;place-items:center;width:52px;height:52px;margin:0 0 16px;
  border-radius:16px;background:#f8e9ee;color:#b0566f;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.7),0 8px 20px rgba(176,86,111,.13);
}
.nrh-modal-icon svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.nrh-modal[data-type="success"] .nrh-modal-icon{background:#edf5ee;color:#4f7a5b;box-shadow:inset 0 0 0 1px rgba(255,255,255,.7),0 8px 20px rgba(79,122,91,.12)}
.nrh-modal[data-type="error"] .nrh-modal-icon{background:#fbecee;color:#a94a55;box-shadow:inset 0 0 0 1px rgba(255,255,255,.7),0 8px 20px rgba(169,74,85,.12)}
.nrh-modal[data-type="confirm"] .nrh-modal-icon{background:#f8e9ee;color:#b0566f}
.nrh-modal-title{
  margin:0;font:600 22px/1.42 "Noto Serif KR",serif;
  letter-spacing:-.01em;color:#3f332e;
}
.nrh-modal-msg{
  margin:10px 0 0;font-size:13.5px;line-height:1.8;color:#7a635c;
  white-space:pre-line;overflow-wrap:anywhere;
}
.nrh-modal-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-top:25px}
.nrh-modal-btn{
  display:inline-flex;align-items:center;justify-content:center;
  height:44px;min-width:96px;padding:0 20px;
  border:1px solid #eadbd1;border-radius:12px;background:#fff;
  font:600 13px "Noto Sans KR",sans-serif;color:#5a4038;
  cursor:pointer;white-space:nowrap;
  transition:background .16s,border-color .16s,color .16s,box-shadow .16s,transform .16s;
}
.nrh-modal-btn:hover{border-color:#d9b9c5;color:#b0566f;background:#fffbfc}
.nrh-modal-btn:active{transform:translateY(1px)}
.nrh-modal-btn:focus-visible{outline:0;box-shadow:0 0 0 4px rgba(176,86,111,.16)}
.nrh-modal-btn.nrh-modal-ok{
  border-color:transparent;
  background:linear-gradient(135deg,#c46b83,#a94a65);
  color:#fff;box-shadow:0 8px 18px rgba(176,86,111,.24);
}
.nrh-modal-btn.nrh-modal-ok:hover{background:linear-gradient(135deg,#c9768b,#ad4e68);color:#fff;box-shadow:0 11px 22px rgba(176,86,111,.3)}
.nrh-modal[data-tone="danger"] .nrh-modal-btn.nrh-modal-ok{background:linear-gradient(135deg,#b9606c,#98424f);box-shadow:0 8px 18px rgba(152,66,79,.24)}
.nrh-modal[data-tone="danger"] .nrh-modal-btn.nrh-modal-ok:hover{background:linear-gradient(135deg,#c16a76,#a44a56)}
.nrh-modal-btn[hidden]{display:none!important}

@media(max-width:520px){
  .nrh-modal-layer{padding:16px}
  .nrh-modal{max-height:calc(100vh - 32px);padding:26px 22px 20px;border-radius:20px}
  .nrh-modal-icon{width:48px;height:48px;margin-bottom:14px;border-radius:14px}
  .nrh-modal-title{font-size:20px}
  .nrh-modal-msg{font-size:13px;line-height:1.75}
  .nrh-modal-actions{flex-direction:column;gap:8px;margin-top:22px}
  .nrh-modal-btn{width:100%;height:46px}
}
@media(prefers-reduced-motion:reduce){
  .nrh-modal-layer,.nrh-modal-scrim,.nrh-modal{transition:none!important}
  .nrh-modal{transform:none}
}
