/* =========================================================
   Duovly — 의뢰 상세 (Order Detail) design layer
   Mockup: ui_kits/app/OrderDetail.html — reproduced with tokens.css vars.
   Card signature (DESIGN-HANDOFF §2): surface + border + sh-card + r-lg.
   letter-spacing 0 everywhere (token rule). Hit areas >=44px.
   Class names mirror renderOrderDetail() in src/screens/orders.js.
   ========================================================= */

.od-screen {
  background: var(--warm-white);
  padding-top: 0;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
}
.od-screen,
.od-screen * { letter-spacing: 0; }

.od-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0 20px 118px;
}

.od-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-card);
  box-sizing: border-box;
}

.od-sec-t {
  font-size: var(--fs-h3);
  font-weight: var(--fw-heavy);
  color: var(--ink-900);
  margin: 22px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.od-sec-t__edit {
  font-size: var(--fs-caption);
  font-weight: var(--fw-bold);
  color: var(--ink-400);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 4px;
  min-height: 32px;
}

/* ---- header ---- */
.od-hd {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
}
.od-hd__btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  box-shadow: var(--sh-2);
  display: grid;
  place-items: center;
  color: var(--ink-900);
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}
.od-hd__title {
  font-size: var(--fs-h1);
  font-weight: var(--fw-heavy);
  color: var(--ink-900);
  flex: 1 1 auto;
}

/* ---- hero acceptance card ---- */
.od-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  padding: 18px;
  box-sizing: border-box;
  background:
    radial-gradient(circle at 90% 10%, rgba(24, 199, 184, 0.14), transparent 45%),
    linear-gradient(135deg, #EAF8F1 0%, #F2FBF6 55%, #FCF6EE 100%);
  border: 1px solid rgba(24, 199, 184, 0.16);
  box-shadow: var(--sh-3);
}
.od-hero__titlerow {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
}
.od-hero__title {
  font-size: var(--fs-h2);
  font-weight: var(--fw-heavy);
  color: var(--ink-900);
  flex: 1 1 auto;
}
/* status pill — inline background is set from pres.pillText; ensure legible text */
.od-hero__badge {
  font-size: var(--fs-meta);
  font-weight: var(--fw-heavy);
  color: #fff;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  flex-shrink: 0;
  white-space: nowrap;
}
.od-hero__body {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  position: relative;
  z-index: 1;
}
.od-hero__avwrap {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}
.od-hero__av {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: var(--sh-2);
  background: var(--surface);
  display: block;
}
.od-hero__dot {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2.5px solid #fff;
  background: var(--mint-500);
}
.od-hero__who {
  flex: 1 1 auto;
  min-width: 0;
}
.od-hero__name {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: var(--fs-h2);
  font-weight: var(--fw-heavy);
  color: var(--ink-900);
}
.od-hero__tags {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 5px;
}
.od-hero__tag {
  font-size: var(--fs-meta);
  font-weight: var(--fw-heavy);
  color: var(--ink-700);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.od-hero__promise {
  flex-shrink: 0;
  width: 132px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(246, 198, 91, 0.3);
  border-radius: var(--r-md);
  padding: 11px 10px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.od-hero__medal {
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
}
.od-hero__ptxt {
  font-size: var(--fs-tiny);
  font-weight: var(--fw-heavy);
  color: var(--butter-700);
  line-height: 1.4;
}

/* ---- stat strip ---- */
.od-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 16px 4px;
  margin-top: 14px;
}
.od-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  text-align: center;
  padding: 0 4px;
}
.od-stat + .od-stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: var(--border);
}
.od-stat__ic {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
}
.od-ic-date { background: var(--mint-50); }
.od-ic-time { background: var(--butter-100); }
.od-ic-svc { background: #ECE7FF; }
.od-ic-amt { background: var(--butter-100); }
.od-stat__v {
  font-size: var(--fs-body);
  font-weight: var(--fw-heavy);
  color: var(--ink-900);
}
.od-stat__v.sm { font-size: var(--fs-caption); }
.od-stat__l {
  font-size: var(--fs-tiny);
  font-weight: var(--fw-bold);
  color: var(--ink-400);
}
/* coin disk glyph used in the amount stat */
.od-coin-c {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(160deg, #FFE89A, var(--butter-500) 50%, #E0951C);
  display: inline-grid;
  place-items: center;
  color: var(--butter-700);
  font-size: 12px;
  font-weight: var(--fw-heavy);
}

/* ---- timeline ---- */
.od-tl { padding: 16px; }
.od-tlrow {
  display: flex;
  gap: 14px;
  position: relative;
  padding-bottom: 18px;
}
.od-tlrow:last-child { padding-bottom: 0; }
.od-tldot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  z-index: 1;
  background: var(--surface);
}
.od-tldot--done { background: var(--mint-500); }
.od-tldot--cur { border: 3px solid var(--warning); }
.od-tldot--wait { border: 2px solid var(--border); }
.od-tlrow:not(:last-child) .od-tldot::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 24px;
  bottom: 2px;
  width: 2px;
  background: var(--border);
}
.od-tlrow--done:not(:last-child) .od-tldot::after { background: var(--mint-500); }
.od-tltxt { flex: 1 1 auto; }
.od-tltitle {
  font-size: var(--fs-body);
  font-weight: var(--fw-heavy);
  color: var(--ink-900);
}
.od-tltitle.muted { color: var(--ink-400); }
.od-tldate {
  font-size: var(--fs-meta);
  color: var(--ink-400);
  margin-top: 2px;
  font-weight: var(--fw-semibold);
}
.od-tlstate {
  font-size: var(--fs-caption);
  font-weight: var(--fw-heavy);
  flex-shrink: 0;
  align-self: center;
}
.od-st-done { color: var(--mint-600); }
.od-st-cur {
  color: var(--warning-fg);
  background: var(--warning-bg);
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: var(--fs-meta);
}
.od-st-wait {
  color: var(--ink-400);
  background: var(--surface-sunken);
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: var(--fs-meta);
}

/* ---- request content ---- */
.od-req { padding: 16px; }
.od-reqbox {
  background: var(--surface-sunken);
  border-radius: var(--r-md);
  padding: 14px;
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  line-height: 1.6;
  color: var(--ink-700);
  white-space: pre-wrap;
}

/* ---- escrow card ---- */
.od-esc {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  padding: 16px;
  margin-top: 14px;
  box-sizing: border-box;
  background:
    radial-gradient(circle at 12% 30%, rgba(246, 198, 91, 0.16), transparent 45%),
    linear-gradient(135deg, #FCF4E2 0%, #FBF7EF 100%);
  border: 1px solid rgba(246, 198, 91, 0.25);
}
.od-esc__top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.od-esc__sh {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: var(--r-md);
  background: linear-gradient(160deg, #FFE08A, var(--warning));
  display: grid;
  place-items: center;
  box-shadow: 0 5px 12px rgba(232, 161, 22, 0.35);
}
.od-esc__main {
  flex: 1 1 auto;
  min-width: 0;
}
.od-esc__title {
  font-size: var(--fs-h3);
  font-weight: var(--fw-heavy);
  color: var(--ink-900);
  display: flex;
  align-items: center;
  gap: 5px;
}
.od-esc__sub {
  font-size: var(--fs-meta);
  font-weight: var(--fw-bold);
  color: var(--warning-fg);
  margin-top: 3px;
}
.od-esc__amt {
  font-size: var(--fs-body);
  font-weight: var(--fw-heavy);
  color: var(--warning-fg);
  flex-shrink: 0;
}
.od-esc__bar {
  display: flex;
  align-items: center;
  margin-top: 16px;
}
.od-esc__node {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--surface);
}
.od-nd-done { background: var(--mint-500); }
.od-nd-cur { border: 2px solid var(--warning); }
.od-nd-wait { border: 2px solid rgba(16, 32, 51, 0.15); }
.od-esc__seg {
  flex: 1 1 auto;
  height: 3px;
}
.od-seg-done { background: var(--mint-500); }
.od-seg-cur { background: linear-gradient(90deg, var(--mint-500), var(--warning)); }
.od-seg-wait { background: rgba(16, 32, 51, 0.12); }
.od-esc__labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}
.od-esc__lb {
  font-size: var(--fs-tiny);
  font-weight: var(--fw-bold);
  color: var(--ink-400);
  flex: 1;
}
.od-esc__lb:nth-child(2) { text-align: center; }
.od-esc__lb:last-child { text-align: right; }

/* ---- checklist (rows are real <button>s) ---- */
.od-chk { padding: 4px 16px; }
.od-chkrow {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 0;
  min-height: 48px;
  box-sizing: border-box;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
}
.od-chkrow + .od-chkrow { border-top: 1px solid var(--border); }
.od-chkrow__ic {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--mint-50);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.od-chkrow__lbl {
  flex: 1 1 auto;
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  color: var(--ink-900);
}
.od-chkrow__val {
  font-size: var(--fs-caption);
  font-weight: var(--fw-heavy);
  color: var(--mint-600);
}
.od-chkrow__chev { color: var(--ink-300); display: inline-flex; }

/* ---- notice banner ---- */
.od-notice {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--pale-blue);
  border: 1px solid rgba(91, 141, 239, 0.14);
  font-size: var(--fs-caption);
  font-weight: var(--fw-bold);
  color: var(--ink-700);
}
.od-notice > svg {
  color: var(--info);
  flex-shrink: 0;
}
.od-notice__more {
  margin-left: auto;
  font-size: var(--fs-meta);
  font-weight: var(--fw-bold);
  color: var(--ink-400);
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 4px;
  min-height: 32px;
}

/* ---- bottom bar ---- */
.od-bottombar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 10px;
  padding: 12px 20px calc(14px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}
.od-bb__ghost {
  flex: 1 1 0;
  height: 54px;
  border-radius: var(--r-lg);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink-900);
  font-size: var(--fs-body-lg);
  font-weight: var(--fw-heavy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}
.od-bb__cta {
  flex: 1.3 1 0;
  height: 54px;
  border: none;
  border-radius: var(--r-lg);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--on-action);
  font-size: var(--fs-h3);
  font-weight: var(--fw-heavy);
  background: linear-gradient(135deg, var(--coral-400), var(--rose-500));
  box-shadow: var(--sh-cta), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
