/* Tracking result, Nov 2026 redesign. Markup: template-parts/components/tracking-result-v2.php.
   Own trd- prefix so the older tracking-result styles never reach it. */
.tracking-portal--result { background: #f4f4f2; }
.tracking-portal--result ::selection { background: #fdfd00; color: #262626; }

.trd-band { background: #262626; padding: 10px 24px 20px; }
.trd-band__form { max-width: 880px; margin: 0 auto; display: flex; gap: 10px; }
.trd-band__form input { flex: 1; min-width: 0; height: 46px; border: 0; border-radius: 12px; padding: 0 16px; font: 600 16px/1 var(--font-body, Inter, sans-serif); letter-spacing: .04em; font-variant-numeric: tabular-nums; color: #262626; background: #fff; }
.trd-band__form button { height: 46px; border: 0; border-radius: 12px; padding: 0 22px; background: #fdfd00; color: #262626; font: 700 15px/1 var(--font-body, Inter, sans-serif); cursor: pointer; }
.trd-band__form button:hover { background: #f2f200; }
.trd-band__form :focus-visible, .trd :focus-visible { outline: 2px solid #262626; outline-offset: 2px; }

.trd-wrap { max-width: 880px; margin: 18px auto 40px; padding: 0 16px; }
.trd { background: #fff; border-radius: 16px; box-shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 8px 24px -12px rgba(17, 17, 17, .12); overflow: hidden; color: #262626; font: 400 15px/1.5 var(--font-body, Inter, sans-serif); }

.trd-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px; border-bottom: 1px solid #e5e7eb; }
.trd-id { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.trd-id span { font-size: 13px; color: #6b7280; }
.trd-id h1 { margin: 0; font: 700 22px/1.2 var(--font-heading, Sora, sans-serif); letter-spacing: .01em; font-variant-numeric: tabular-nums; color: #262626; }
.trd-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.trd-pill { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 999px; font: 600 13px/1 var(--font-body, Inter, sans-serif); white-space: nowrap; }
.trd-pill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.trd-pill--ok { background: #e7f6ec; color: #15803d; }
.trd-pill--go { background: #ffffd9; color: #4d4d00; box-shadow: inset 0 0 0 1px #e6e600; }
.trd-pill--bad { background: #fdecec; color: #b91c1c; }

.trd-status { padding: 22px 24px 18px; display: grid; gap: 4px; }
.trd-status h2 { margin: 0; font: 700 clamp(26px, 4vw, 34px)/1.15 var(--font-heading, Sora, sans-serif); letter-spacing: -0.02em; text-wrap: balance; color: #262626; }
.trd-when { color: #4b5563; font-size: 15px; font-variant-numeric: tabular-nums; }
.trd-received { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 12px; border-radius: 10px; background: #e7f6ec; color: #15803d; font-weight: 600; font-size: 14px; justify-self: start; }

.trd-facts { display: grid; grid-template-columns: 1.6fr 1fr; border-top: 1px solid #e5e7eb; }
.trd-facts:empty { display: none; }
.trd-fact { padding: 14px 24px; display: flex; align-items: center; gap: 12px; }
.trd-fact + .trd-fact { border-left: 1px solid #e5e7eb; }
.trd-fact svg { flex: none; color: #6b7280; }
.trd-fact small { display: block; font-size: 12.5px; color: #6b7280; }
.trd-fact b { font-weight: 600; }
.trd-route { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.trd-route > span[aria-hidden] { color: #6b7280; }

.trd-steps { list-style: none; margin: 0; padding: 18px 16px 20px; display: grid; grid-template-columns: repeat(7, 1fr); position: relative; border-top: 1px solid #e5e7eb; background: #fbfbfa; }
.trd-steps::before, .trd-steps::after { content: ""; position: absolute; top: 29px; left: calc(100% / 14 + 16px); height: 2px; }
.trd-steps::before { right: calc(100% / 14 + 16px); background: #d4d6da; }
.trd-steps::after { width: calc((100% - 100% / 7 - 32px) * var(--trd-progress, 0)); background: #262626; }
.trd-step { position: relative; z-index: 1; text-align: center; margin: 0; }
.trd-dot { display: block; width: 22px; height: 22px; margin: 0 auto 7px; border-radius: 50%; background: #fff; border: 2px solid #c7cbd1; position: relative; }
.trd-step.done .trd-dot { background: #262626; border-color: #262626; }
.trd-step.done .trd-dot::after, .trd-step.now.ok .trd-dot::after { content: ""; position: absolute; inset: 5px 5px 7px; border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.trd-step.now .trd-dot { background: #fdfd00; border-color: #262626; box-shadow: 0 0 0 4px rgba(253, 253, 0, .35); }
.trd-step.now.ok .trd-dot { background: #15803d; border-color: #15803d; box-shadow: 0 0 0 4px rgba(21, 128, 61, .18); }
.trd-label { display: block; font-size: 12.5px; line-height: 1.25; color: #6b7280; }
.trd-step.done .trd-label { color: #4b5563; }
.trd-step.now .trd-label { color: #262626; font-weight: 700; }

.trd-hist { border-top: 1px solid #e5e7eb; padding: 6px 24px 14px; }
.trd-hist h3 { margin: 14px 0 6px; font: 600 17px/1.3 var(--font-heading, Sora, sans-serif); color: #262626; }
.trd-day { margin-top: 10px; }
.trd-day h4 { margin: 0; padding: 8px 0 6px; font: 600 13px/1.3 var(--font-body, Inter, sans-serif); color: #6b7280; border-bottom: 1px solid #eef0f3; font-variant-numeric: tabular-nums; }
.trd-ev { display: grid; grid-template-columns: 76px 1fr; gap: 14px; padding: 10px 0; border-bottom: 1px solid #eef0f3; }
.trd-day .trd-ev:last-child { border-bottom: 0; }
.trd-ev time { color: #6b7280; font-size: 13.5px; font-variant-numeric: tabular-nums; padding-top: 1px; white-space: nowrap; }
.trd-ev p { margin: 0; font-size: 14.5px; line-height: 1.4; }
.trd-ev.first p { font-weight: 600; }
.trd-place { display: block; color: #6b7280; font-size: 13px; font-weight: 400; margin-top: 2px; }
.trd-tag { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font: 600 11.5px/18px var(--font-body, Inter, sans-serif); vertical-align: 1px; }
.trd-tag--ok { background: #e7f6ec; color: #15803d; }
.trd-tag--cus { background: #fdf3e2; color: #92400e; }
.trd-tag--go { background: #ffffd9; color: #4d4d00; }

.trd-poll { display: flex; align-items: center; gap: 8px; padding: 9px 24px; border-top: 1px solid #e5e7eb; background: #fafafa; font-size: 12.5px; color: #4b5563; }
.trd-poll__icon { display: inline-flex; animation: trd-spin 1.6s linear infinite; }
.trd-poll .tracking-poll__retry-btn { margin-top: 6px !important; padding: 6px 12px; font-size: 12px; }
@keyframes trd-spin { to { transform: rotate(360deg); } }

.trd-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 24px 16px; border-top: 1px solid #e5e7eb; font-size: 13px; color: #6b7280; }
.trd-foot a { color: #262626; font-weight: 600; text-underline-offset: 3px; }

@media (max-width: 640px) {
	.trd-band { padding: 8px 14px 16px; }
	.trd-wrap { padding: 0 10px; margin-top: 12px; }
	.trd-head { padding: 14px 16px; flex-wrap: wrap; }
	.trd-status, .trd-hist { padding-left: 16px; padding-right: 16px; }
	.trd-facts { grid-template-columns: 1fr; }
	.trd-fact { padding: 12px 16px; }
	.trd-fact + .trd-fact { border-left: 0; border-top: 1px solid #e5e7eb; }
	.trd-steps { padding: 16px 6px; }
	.trd-steps::before, .trd-steps::after { top: 27px; left: calc(100% / 14 + 6px); }
	.trd-steps::before { right: calc(100% / 14 + 6px); }
	.trd-steps::after { width: calc((100% - 100% / 7 - 12px) * var(--trd-progress, 0)); }
	.trd-dot { width: 18px; height: 18px; }
	.trd-step.done .trd-dot::after, .trd-step.now.ok .trd-dot::after { inset: 4px 4px 6px; }
	.trd-label { font-size: 10.5px; }
	.trd-ev { grid-template-columns: 68px 1fr; gap: 10px; }
	.trd-ev time { font-size: 12.5px; }
	.trd-poll, .trd-foot { padding-left: 16px; padding-right: 16px; }
}
@media (prefers-reduced-motion: reduce) { .trd-poll__icon { animation: none; } }
