/* 직접 편집하는 원본 CSS. 섹션 번호와 순서는 네 파일에서 동일합니다. */
/* 모든 폼팩터 공통 UI. 페이지별 스타일은 pages.css에서 관리합니다. */
/* 00. 기본 · 글꼴 · 토큰 · 초기화 */
@font-face {
  font-family: Pretendard;
  src: url('../fonts/Pretendard-Regular.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Pretendard;
  src: url('../fonts/Pretendard-Medium.otf') format('opentype');
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: Pretendard;
  src: url('../fonts/Pretendard-SemiBold.otf') format('opentype');
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: Pretendard;
  src: url('../fonts/Pretendard-Bold.otf') format('opentype');
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: Pretendard;
  src: url('../fonts/Pretendard-ExtraBold.otf') format('opentype');
  font-weight: 800;
  font-display: swap;
}

@keyframes slide-right {
  from {
    transform: translateX(100%);
  }

  to {
    transform: translateX(0);
  }

}

@keyframes slide-up {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }

}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }

}

:root {
  --green: #22c55e;
  --red: #ef4444;
  --ink: #111827;
  --text: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --input-line: #d1d5db;
  --paper: #fcfcfc;
  --header: 80px;
  --drawer: 40vw;
  --body: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  font: var(--body)/1.5 Pretendard,Arial,sans-serif;
  letter-spacing: -.02em;
  color: var(--ink);
  background: white;
}

p {
  margin: 0;
}

ul {
  margin: 0;
}

ol {
  margin: 0;
}

dl {
  margin: 0;
}

dd {
  margin: 0;
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.4;
}

h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.4;
}

h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.4;
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  color: inherit;
  border-radius: 0;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}

button:disabled {
  cursor: not-allowed;
  opacity: .3;
}

img {
  max-width: 100%;
  display: block;
}

input {
  font: inherit;
  color: inherit;
  border-radius: 0;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--input-line);
  background: white;
  padding: 12px 16px;
  outline-offset: 2px;
  height: 50px;
}

input::placeholder {
  color: #9ca3af;
}

textarea::placeholder {
  color: #9ca3af;
}

input[readonly] {
  background: var(--paper);
  color: var(--muted);
}

textarea {
  font: inherit;
  color: inherit;
  border-radius: 0;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--input-line);
  background: white;
  padding: 12px 16px;
  outline-offset: 2px;
  resize: vertical;
  min-height: 100px;
}

input[type=radio] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--green);
  flex-shrink: 0;
  padding: 0;
}

fieldset {
  margin: 0;
  border: 0;
  padding: 0;
  min-width: 0;
}

legend {
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 16px;
  padding: 0;
}

small {
  font-size: 14px;
  color: var(--muted);
  font-weight: 400;
}

button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}

a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}

input:focus-visible {
  outline: 2px solid var(--green);
}

select:focus-visible {
  outline: 2px solid var(--green);
}

textarea:focus-visible {
  outline: 2px solid var(--green);
}

[hidden] {
  display: none !important;
}

select {
  font: inherit;
  color: inherit;
  border-radius: 0;
  -webkit-tap-highlight-color: transparent;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--input-line);
  padding: 12px 16px;
  outline-offset: 2px;
  height: 50px;
  appearance: none;
  background: white url('../images/dropdown-down.svg') right 12px center/18px no-repeat;
  padding-right: 36px;
}

input[type=checkbox] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--green);
  flex-shrink: 0;
  padding: 0;
  appearance: none;
  border: 1px solid var(--input-line);
  background: white;
}

input[type=checkbox]:checked {
  border-color: var(--green);
  background: white url('../images/icon-check.svg') center/16px no-repeat;
}

input[type=checkbox]:disabled {
  opacity: .4;
}

/* 01. 공통 레이아웃 · 버튼 · 입력 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 50;
  left: 16px;
  top: -100px;
  background: white;
  padding: 12px;
}

.skip-link:focus {
  top: 8px;
}

.container {
  width: min(1200px,calc(100% - 48px));
  margin-inline: auto;
}

.icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  font-weight: 700;
  line-height: 1.25;
  border: 1px solid transparent;
  text-align: center;
}

.primary {
  background: var(--green);
  color: white;
}

.primary:hover {
  background: #1ab654;
}

.secondary {
  background: white;
  border-color: var(--input-line);
  color: var(--text);
}

.secondary:hover {
  background: var(--paper);
}

.button-row {
  display: flex;
  gap: 12px;
}

.button-row>* {
  flex: 1;
}

.dialog-heading .icon-button{
  transform: translateX(14px);
}

.icon-button {
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.helper {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.notice {
  background: var(--paper);
  padding: 20px;
  color: var(--muted);
  margin: 24px 0;
  font-size: 14px;
  border: 1px solid var(--line);
}

.page-content {
  padding-block: 40px 64px;
  min-height: calc(100vh - 360px);
}

.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  min-width: 0;
}

.field+.field {
  margin-top: 20px;
}

.field input {
  font-weight: 400;
}

.field textarea {
  font-weight: 400;
}

.character-count {
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.date-picker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: 1px solid var(--input-line);
  min-height: 50px;
  padding: 12px 16px;
  font-weight: 400;
  color: var(--muted);
  text-align: left;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0;
  font-weight: 400;
}

.button .icon {
  width: 20px;
  height: 20px;
}

.icon-button .icon {
  width: 40px;
  height: 40px;
}

.field-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.field-heading .icon {
  width: 22px;
  height: 22px;
}

legend .icon {
  display: inline-block;
  width: 22px;
  height: 22px;
  vertical-align: -4px;
  margin-right: 8px;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}

.pagination button {
  min-width: 36px;
  height: 36px;
  border: 1px solid var(--line);
}

.pagination .active {
  color: var(--green);
  border-color: var(--green);
}

.pagination-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pagination-arrow:disabled {
  opacity: 1;
}

.pagination-arrow .icon {
  width: 24px;
  height: 24px;
}

/* 02. 헤더 · 내비게이션 */
.site-header {
  position: sticky;
  top: 0;
  height: var(--header);
  border-bottom: 1px solid var(--line);
  background: white;
  z-index: 9990;
}

.header-wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: block;
  width: 118px;
  flex-shrink: 0;
}

.logo img {
  width: 100%;
  height: auto;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 600;
}

.desktop-nav a {
  display: flex;
  align-items: center;
  gap: 6px;
}

.desktop-nav .icon {
  width: 16px;
  height: 16px;
}

.desktop-nav strong {
  font-size: 18px;
}

.header-login-info{
  display: flex;
  gap: 10px;
  align-items: center;
}

.nav-divider {
  height: 18px;
  width: 1px;
  background: var(--line);
}

.logout {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  color: var(--green);
  border: 1px solid var(--green);
  padding: 3px 8px;
  font-weight: 700;
}

.menu-toggle {
  display: none;
}

.login-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  color: var(--green);
  border: 1px solid var(--green);
  padding: 3px 8px;
  font-weight: 700;
  white-space: nowrap;
  line-height: 20px;
}

.desktop-nav a.login-link {
  gap: 5px;
}

/* 03. 푸터 */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper);
  padding: 32px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.site-footer nav {
  display: flex;
  gap: 24px;
  padding-bottom: 24px;
  margin-bottom: 24px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
  border-bottom: 1px solid #e5e7eb;
}

.site-footer nav a:first-of-type{
  font-weight: 600;
}

.site-footer p+p {
  margin-top: 14px;
}

/* 04. 공통 모달 */
.message-dialog {
  width: min(420px,calc(100% - 32px));
  padding: 32px;
}

.message-dialog h2 {
  text-align: center;
}

.message-dialog p {
  text-align: center;
  margin: 24px 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.message-dialog .button-row {
  margin-top: 24px;
}

.content-dialog {
  width: min(760px,calc(100% - 48px));
  height: min(800px,calc(100dvh - 80px));
  overflow: hidden;
}

.content-dialog[open] {
  display: flex;
  flex-direction: column;
}

.dialog-scroll {
  padding: 32px;
  overflow: auto;
  min-height: 0;
  flex: 1;
  overscroll-behavior: contain;
}

.calendar-dialog {
  width: min(380px,calc(100% - 32px));
  padding-bottom: 20px;
}


.calendar-dialog .helper {
  padding: 16px 20px 0;
  font-size: 12px;
}

/* Figma 282:4289 / 295:5634: 기존 헤더 아래에서 본문만 덮는 우측 슬라이드. */
 .menu-dialog {
  position: fixed;
  inset: var(--menu-top, var(--header)) 0 0;
  margin: 0;
  width: 100vw;
  height: calc(100dvh - var(--menu-top, var(--header)));
  max-height: calc(100dvh - var(--menu-top, var(--header)));
  z-index: 30;
  overflow: hidden;
  background: white;
}
.menu-dialog[open] { display: flex; flex-direction: column; }
.menu-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 40px 24px max(40px,env(safe-area-inset-bottom)); }
.menu-account { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; margin-bottom: 24px; }
.menu-account strong { color: var(--muted); font-size: 18px; line-height: 26px; font-weight: 700; }
.menu-account-action { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; padding: 3px 8px; border: 1px solid var(--green); color: var(--green); font-size: 14px; line-height: 20px; font-weight: 700; }
.menu-account-action .icon { width: 16px; height: 16px; }
.menu-dialog nav { border-top: 1px solid var(--line); }
.menu-dialog nav a { min-height: 56px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 22px; font-weight: 600; }
.menu-dialog nav a .icon { width: 16px; height: 16px; flex-shrink: 0; }
.menu-dialog nav a .icon:last-child { margin-left: auto; }

dialog {
  border: 0;
  padding: 0;
  color: var(--ink);
  max-width: none;
  max-height: none;
}

dialog::backdrop {
  background: #11182766;
}

body.modal-open {
  overflow: hidden;
}

.dialog-heading {
  padding: 10px 32px 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.dialog-heading h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dialog-footer {
  display: flex;
  gap: 12px;
  padding: 20px 32px;
  border-top: 1px solid var(--line);
  background: white;
  flex-shrink: 0;
}

.dialog-footer>.button {
  flex: 1;
  min-height: 56px;
}

/* 05. 달력 */
.ui-datepicker {
  width: 320px;
  max-width: calc(100vw - 32px);
  padding: 24px 32px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  border-radius: 0;
  font-family: Pretendard, sans-serif;
  font-size: 15px;
  box-shadow: 0 8px 24px #11182714;
}

#ui-datepicker-div {
  z-index: 40 !important;
}

#delivery-datepicker .ui-datepicker {
  width: 100%;
  max-width: none;
  border: 0;
  box-shadow: none;
}

.ui-datepicker .ui-datepicker-header {
  border: 0;
  background: white;
  padding: 8px 0 16px;
  border-radius: 0;
}

.ui-datepicker .ui-datepicker-title {
  font-size: 16px;
  line-height: 32px;
}

.ui-datepicker .ui-datepicker-prev {
  top: 8px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  background: white center/20px no-repeat;
  left: 0;
  background-image: url('../images/material/chevron_left.svg');
}

.ui-datepicker .ui-datepicker-next {
  top: 8px;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  background: white center/20px no-repeat;
  right: 0;
  background-image: url('../images/material/chevron_right.svg');
}

.ui-datepicker .ui-datepicker-prev span {
  display: none;
}

.ui-datepicker .ui-datepicker-next span {
  display: none;
}

.ui-datepicker .ui-datepicker-prev:focus-visible {
  outline: 2px solid var(--green);
}

.ui-datepicker .ui-datepicker-next:focus-visible {
  outline: 2px solid var(--green);
}

.ui-datepicker table {
  margin: 0;
  font-size: 14px;
}

.ui-datepicker th {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.ui-datepicker td {
  padding: 1px;
}

.ui-datepicker .ui-state-default {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border: 1px solid transparent;
  background: white;
  color: var(--ink);
  border-radius: 0;
}

.ui-datepicker .ui-state-highlight {
  border-color: var(--green);
  color: var(--green);
}

.ui-datepicker .ui-state-hover {
  background: var(--green);
  color: white;
}

.ui-datepicker .ui-state-active {
  background: var(--green);
  color: white;
}

.ui-datepicker .ui-state-disabled {
  opacity: .3;
}

.ui-datepicker .busy a {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.search-date {
  background: white url('../images/calendar.svg') right 12px center/16px 18px no-repeat;
  padding-right: 36px;
}

@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

}


/* 기존 400px 모달 서식: 제목/닫기, 메시지, 하단 액션 순서입니다. */
.message-dialog { width: min(400px, calc(100% - 32px)); padding: 0 30px 30px; }
.message-dialog .modal-top { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.message-dialog .modal-top h2 { font-size: 18px; }
.message-dialog .modal-top .icon-button {width: 40px;height: 40px;transform: translateX(12px);}
.message-dialog p { margin: 20px 0 25px; font-size: 18px; font-weight: 700; }
.message-dialog .button-row { margin-top: 0; }
/* 배송 혼잡일은 파란색과 밑줄을 함께 사용합니다. 선택 가능 상태를 유지합니다. */
.ui-datepicker .ui-datepicker-header { position: relative; }
.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position: absolute; }
.ui-datepicker table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ui-datepicker .ui-state-default { width: 100%; cursor: pointer; }
.ui-datepicker .ui-state-default:disabled { cursor: default; }
.ui-datepicker .busy .ui-state-default { color: #2563eb; background: #eff6ff; text-decoration: underline; text-underline-offset: 4px; }
.ui-datepicker .busy .ui-state-active { background: #2563eb; color: white; }
.ui-datepicker button:focus-visible { outline: 2px solid #2563eb; outline-offset: -2px; }
.search-calendar .ui-datepicker { width: 100%; max-width: none; border: 0; box-shadow: none; }

/* 조회 기간 달력: 주문 내역 필터에서 사용하는 모달 전용 시안 */
.calendar-dialog--search {
  width: min(420px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 18px 48px #1118272b;
}

.calendar-dialog--search .dialog-heading {
  min-height: 68px;
  padding: 16px 20px;
}

.calendar-dialog--search .dialog-heading h2 {
  font-size: 18px;
  line-height: 28px;
  font-weight: 700;
}

.calendar-dialog--search .dialog-heading .icon-button {
  width: 36px;
  height: 36px;
  margin-right: -6px;
}

.calendar-dialog--search .search-calendar {
  padding: 8px 16px 16px;
}

.calendar-dialog--search .ui-datepicker {
  padding: 0px 8px 8px;
}

.calendar-dialog--search .ui-datepicker-header {
  padding: 8px 0 14px;
}

.calendar-dialog--search .ui-datepicker-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 32px;
  text-align: center;
}

.calendar-dialog--search .ui-datepicker-prev,
.calendar-dialog--search .ui-datepicker-next {
  top: 8px;
}

.calendar-dialog--search .ui-datepicker th {
  height: 32px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
}

.calendar-dialog--search .ui-datepicker th:first-child { color: #dc2626; }
.calendar-dialog--search .ui-datepicker th:last-child { color: #2563eb; }

.calendar-dialog--search .ui-datepicker td {
  padding: 2px;
}

.calendar-dialog--search .ui-state-default {
  width: 36px;
  height: 36px;
  margin: 0 auto;
  border-radius: 50%;
  font-size: 14px;
}

.calendar-dialog--search .ui-datepicker td:first-child .ui-state-default { color: #dc2626; }
.calendar-dialog--search .ui-datepicker td:last-child .ui-state-default { color: #2563eb; }
.calendar-dialog--search .ui-datepicker .ui-state-hover { color: #fff; background: #159447; }
.calendar-dialog--search .ui-datepicker .ui-state-active { color: #fff; background: #159447; }
