/* =========================================================================
   注文1件の詳細UI 共通スタイル（order-detail.js とペアの唯一の正本）
   mypage（modal内）と order-status 頁（inline）の両方で読み込む。
   ========================================================================= */
.order-detail-modal[hidden] { display: none; }
.order-detail-modal {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center; padding: 24px;
}
.order-detail-backdrop { position: absolute; inset: 0; background: color-mix(in srgb, var(--ink) 42%, transparent); }
.order-detail-sheet {
  position: relative; width: min(760px, 100%); max-height: min(760px, calc(100vh - 48px));
  overflow: auto; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); box-shadow: 0 18px 50px color-mix(in srgb, var(--ink) 20%, transparent);
}
.order-detail-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px;
  align-items: start; padding: 22px 24px; border-bottom: 1px solid var(--line);
}
.order-detail-head h2 { margin: 3px 0 0; font-size: 22px; line-height: 1.15; }
.order-detail-close {
  width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer;
}
.order-detail-pill { display: inline-flex; align-items: center; gap: 6px; margin-top: 9px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; background: color-mix(in srgb, var(--blue) 12%, var(--surface)); color: var(--blue); }
.order-detail-pill[hidden] { display: none; }
.order-detail-pill i { width: 7px; height: 7px; border-radius: 999px; background: currentColor; }
.order-detail-pill.is-muted { background: var(--fill); color: var(--muted); }
.order-detail-pill.is-warn { background: color-mix(in srgb, #b45309 14%, var(--surface)); color: #b45309; }
.order-detail-pill.is-danger { background: color-mix(in srgb, #c0392b 12%, var(--surface)); color: #c0392b; }

.return-exchange-sheet { width: min(600px, 100%); }
.return-exchange-order { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; }
.return-exchange-form { display: grid; gap: 16px; padding: 22px 24px 24px; }
.return-exchange-note { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--fill); color: var(--muted); font-size: 12.5px; line-height: 1.65; }
.return-exchange-form > label { display: grid; gap: 7px; }
.return-exchange-form > label > span,
.return-exchange-form legend { color: var(--muted); font-size: 12px; font-weight: 700; }
.return-exchange-form select,
.return-exchange-form input[type="text"],
.return-exchange-form input[type="number"],
.return-exchange-form textarea {
  width: 100%; min-height: 44px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; background: var(--surface); color: var(--ink); font: inherit;
}
.return-exchange-form textarea { resize: vertical; }
.return-exchange-form select:focus,
.return-exchange-form input:focus,
.return-exchange-form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 14%, transparent); }
.return-exchange-form fieldset { display: flex; gap: 18px; margin: 0; padding: 0; border: 0; }
.return-exchange-form legend { margin-bottom: 8px; }
.return-exchange-choice { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 700; }
.return-exchange-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 4px; }
.return-exchange-state { display: inline-flex; align-items: center; min-height: 34px; padding: 0 10px; color: var(--green); font-size: 12px; font-weight: 700; }
.return-exchange-state.is-pending { color: #b45309; }

.order-detail-body { padding: 0; display: grid; gap: 0; grid-template-columns: 1fr; grid-template-areas: "time" "items" "info"; }
.od-time { grid-area: time; padding: 18px 24px 6px; }
.od-items { grid-area: items; padding: 18px 24px 22px; border-top: 1px solid var(--line); }
.od-info { grid-area: info; padding: 16px 24px 24px; border-top: 1px solid var(--line); }
@media (min-width: 621px) {
  .order-detail-body { grid-template-columns: 1.05fr 1fr; grid-template-areas: "time items" "info items"; align-items: start; }
  .od-items { border-top: 0; border-left: 1px solid var(--line); background: var(--paper); }
}

.odt { display: grid; grid-template-columns: repeat(4, 1fr); margin: 12px 0 6px; }
.odt .s { text-align: center; position: relative; }
.odt .s .bar { position: absolute; top: 14px; left: -50%; right: 50%; height: 2px; background: var(--fill-strong); }
.odt .s.on .bar { background: var(--ink); }
.odt .s:first-child .bar { display: none; }
.odt .dot { position: relative; width: 30px; height: 30px; margin: 0 auto; border-radius: 999px; background: var(--fill); border: 2px solid var(--fill-strong); display: flex; align-items: center; justify-content: center; color: #fff; }
.odt .s.on .dot { background: var(--ink); border-color: var(--ink); }
.odt .s.cur .dot { background: var(--surface); border-color: var(--blue); color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 14%, transparent); }
.odt-ic { width: 14px; height: 14px; flex: none; }
.odt .s .l { font-size: 12px; font-weight: 400; margin-top: 8px; }
.odt .s:not(.on):not(.cur) .l { color: var(--muted); }
.odt-abn { display: flex; align-items: center; gap: 9px; margin: 10px 0 6px; font-size: 14px; font-weight: 700; color: var(--muted); }
.odt-abn i { width: 9px; height: 9px; border-radius: 999px; background: currentColor; }

.od-prod { display: flex; gap: 13px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.od-prod:last-of-type { border-bottom: 0; }
.od-thumb { flex: none; width: 48px; height: 48px; border-radius: 10px; background: var(--fill); display: flex; align-items: center; justify-content: center; color: var(--fill-strong); overflow: hidden; }
.od-thumb img { width: 100%; height: 100%; object-fit: contain; background: var(--surface); }
.od-thumb .odt-ic { width: 22px; height: 22px; }
.od-prod .nm { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 700; line-height: 1.35; }
.od-prod .qty { font-size: 12px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.od-prod .amt { font-size: 13.5px; font-weight: 700; white-space: nowrap; text-align: right; min-width: 70px; }
.od-sum { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.od-sum .r { display: flex; justify-content: space-between; font-size: 13px; font-weight: 400; color: var(--muted); padding: 4px 0; }
.od-sum .r b { color: var(--ink); font-weight: 700; }
.od-sum .r.disc b { color: var(--green); }
.od-sum .g { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 11px; font-weight: 700; font-size: 13px; }
.od-sum .g .big { font-size: 22px; font-weight: 700; }

.od-daterow { margin: 0 0 12px; font-size: 12px; font-weight: 400; color: var(--muted); }
.od-daterow b { color: var(--ink); font-weight: 700; }
.od-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface); }
.od-card + .od-card { margin-top: 12px; }
.od-card h4 { margin: 0 0 10px; font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.od-card h4 .odt-ic { width: 15px; height: 15px; color: var(--muted); }
.od-kv { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 12.5px; margin: 0; }
.od-kv dt { color: var(--muted); font-weight: 400; white-space: nowrap; margin: 0; }
.od-kv dd { margin: 0; font-weight: 700; text-align: right; word-break: break-word; }
.od-kv dd.ok { color: var(--green); }
