body.entry-notices {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  display: grid;
  place-items: center;
  background: #42505e;
}
.entry-notices .entry-notices__popup {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.entry-notices__popup .stock-notice-popup__icon-close { font-size: 25px; }
.entry-notices__popup .stock-notice-popup__footer span { font-size: 13px; color: #657386; }
#stock-notice-popup .stock-notice-popup__footer { justify-content: flex-end; }
#stock-notice-popup [hidden] { display: none; }
html.stock-notice-is-open,
html.stock-notice-is-open body {
  overflow: hidden;
  overscroll-behavior: none;
}

.stock-notice-popup {
  width: min(1040px, calc(100% - 40px));
  height: min(920px, calc(100vh - 48px));
  height: min(920px, calc(100dvh - 48px));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  border: 1px solid #dbe3eb;
  border-radius: 12px;
  background: #fff;
  color: #263347;
  box-shadow: 0 24px 90px rgba(17, 35, 52, .25);
  overflow: hidden;
  font-family: "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif;
}

dialog.stock-notice-popup:not([open]) { display: none; }
.stock-notice-popup[open] { display: flex; flex-direction: column; }
.stock-notice-popup::backdrop { background: rgba(18, 28, 43, .56); }

.stock-notice-popup__header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 23px;
  border-bottom: 1px solid #e1e7ed;
  background: #fff;
}

.stock-notice-popup__heading { min-width: 0; }
.stock-notice-popup__heading h2 {
  margin: 0;
  color: #173b57;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.45;
}
.stock-notice-popup__heading p {
  margin: 3px 0 0;
  color: #657386;
  font-size: 12px;
  line-height: 1.5;
  word-break: keep-all;
}
.stock-notice-popup__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 14px;
}
.stock-notice-popup__new-window {
  color: #4d6277;
  font-size: 12px;
  line-height: 1.5;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.stock-notice-popup__new-window:hover { color: #173b57; }
.stock-notice-popup__icon-close {
  display: inline-flex;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #dce4eb;
  border-radius: 6px;
  color: #344d64;
  background: #f7f9fb;
  cursor: pointer;
}
.stock-notice-popup__icon-close:hover { background: #eaf0f5; }
.stock-notice-popup__icon-close svg { width: 20px; height: 20px; }

.stock-notice-popup__body {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  background: #eef1f5;
}
.stock-notice-popup .stock-notice-popup__frame {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  background: #fff;
}
.stock-notice-popup__status {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding: 24px;
  background: #f5f8fb;
  color: #4d6277;
  text-align: center;
  font-size: 14px;
}
.stock-notice-popup__status a { color: #173b57; text-decoration: underline; }

.stock-notice-popup__footer {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 23px;
  border-top: 1px solid #dfe6ed;
  background: #fff;
}
.stock-notice-popup__dismiss-label {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 9px;
  color: #4d5b6d;
  font-size: 13px;
  cursor: pointer;
}
.stock-notice-popup__dismiss-label input {
  width: 17px;
  height: 17px;
  margin: 0;
  padding: 0;
  accent-color: #173b57;
  cursor: pointer;
}
.stock-notice-popup__close {
  min-width: 98px;
  min-height: 40px;
  padding: 9px 24px;
  border: 1px solid #173b57;
  border-radius: 6px;
  color: #fff;
  background: #173b57;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
}
.stock-notice-popup__close:hover { background: #102f48; }
.stock-notice-popup :is(button, a, input):focus-visible,
.stock-notice-link:focus-visible {
  outline: 3px solid #5884aa;
  outline-offset: 3px;
}
footer .stock-notice-link {
  margin-left: auto;
  color: #4b5b70;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .stock-notice-popup {
    width: calc(100% - 16px);
    height: calc(100vh - 24px);
    height: calc(100dvh - 24px);
    border-radius: 9px;
  }
  .stock-notice-popup__header { padding: 12px 13px; gap: 10px; }
  .stock-notice-popup__heading h2 { font-size: 16px; }
  .stock-notice-popup__heading p { font-size: 11px; }
  .stock-notice-popup__actions { gap: 8px; }
  .stock-notice-popup__new-window { font-size: 11px; }
  .stock-notice-popup__footer { padding: 10px 13px; gap: 10px; }
  .stock-notice-popup__close { min-width: 76px; padding: 9px 18px; }
  .stock-notice-popup__dismiss-label { gap: 7px; font-size: 12px; }
  body > footer { flex-wrap: wrap; }
}
@media (max-width: 360px) {
  .stock-notice-popup__actions { gap: 5px; }
  .stock-notice-popup__icon-close { width: 36px; height: 36px; flex-basis: 36px; }
  .stock-notice-popup__heading p { max-width: 135px; }
}
@media print {
  .stock-notice-popup, .stock-notice-popup::backdrop { display: none !important; }
  html.stock-notice-is-open, html.stock-notice-is-open body { overflow: visible; }
}
