/* ============================================================
   SENDUNGSVERFOLGUNG  (app/pages/shipment-tracking.php)
   Nutzt Farben, Felder, Buttons und .ct-direct aus hp.css
   ============================================================ */

.st-hero { padding: 28px 0 clamp(48px, 6vw, 80px); background: #fff; }
.st-hero .breadcrumbs { margin-bottom: clamp(28px, 4vw, 48px); }
.st-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: 40px clamp(40px, 6vw, 96px); align-items: center; }
.st-h1 { margin: 0 0 20px; font-family: var(--f-display); font-stretch: 94%; font-weight: 500; font-size: clamp(32px, 3.6vw, 52px); line-height: 1.08; letter-spacing: -0.026em; color: var(--ink); text-wrap: balance; }
.st-lead { margin: 0 0 32px; max-width: 580px; font-size: clamp(16px, 1.2vw, 18px); line-height: 1.7; color: var(--text); }
.st-help-label { margin: 0 0 12px; font-size: 11.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

.st-search { position: relative; padding: clamp(24px, 3vw, 40px); background: #fff; border: 1px solid var(--line-2); box-shadow: 0 30px 60px -48px rgba(20,22,24,.55); }
.st-search::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 3px; background: var(--accent); }
.st-search-title { margin: 0 0 22px; font-family: var(--f-display); font-stretch: 94%; font-weight: 500; font-size: clamp(22px, 1.9vw, 28px); letter-spacing: -0.02em; color: var(--ink); }
.st-form { display: grid; gap: 18px; }
.st-form .field input { min-height: 54px; font-size: 17px; letter-spacing: .02em; }
.st-form .field > span { font-weight: 500; color: var(--ink); }
.st-form .field small { font-size: 13px; color: var(--muted); }
.st-submit { width: 100%; justify-content: space-between; margin-top: 4px; }
.st-note { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.st-note .icon { flex: none; margin-top: 3px; color: #2E7D46; }

/* ---------- Ergebnis ---------- */
.st-result-section { scroll-margin-top: var(--header-h); }
.st-result { padding: clamp(24px, 3vw, 44px); background: #fff; border: 1px solid var(--line); }
.st-result-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.st-result-label { margin: 0 0 6px; font-size: 11.5px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.st-result-title { margin: 0; font-family: var(--f-display); font-stretch: 94%; font-weight: 500; font-size: clamp(26px, 2.6vw, 38px); letter-spacing: -0.01em; color: var(--ink); word-break: break-all; }
.st-chip { display: inline-flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 16px; font-size: 14px; font-weight: 500; color: #6B4A00; background: #FFF4D6; border-radius: 999px; }
.st-chip-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(107,74,0,.12); }
.st-chip--ok { color: #1E5A30; background: #E5F3E9; }
.st-chip--ok .st-chip-dot { box-shadow: 0 0 0 4px rgba(30,90,48,.14); }

.st-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 36px 0 32px; padding: 0; list-style: none; counter-reset: st; }
.st-step { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-right: 16px; }
.st-step::before { content: ""; position: absolute; left: 34px; right: 0; top: 15px; height: 2px; background: var(--line-2); }
.st-step:last-child::before { display: none; }
.st-step::after { content: ""; position: absolute; left: 34px; right: 0; top: 15px; height: 2px; background: #2E7D46; transform-origin: left center; transform: scaleX(0); }
.st-step--done:not(:last-child)::after { transform: scaleX(1); }
.st-step-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--muted); background: #fff; border: 2px solid var(--line-2); border-radius: 50%; }
.st-step--done .st-step-dot { color: #fff; background: #2E7D46; border-color: #2E7D46; }
.st-step--current .st-step-dot { color: #6B4A00; border-color: #E0A800; box-shadow: 0 0 0 5px rgba(224,168,0,.16); }
.st-step--external .st-step-dot { color: var(--ink); border-color: var(--ink); }
.st-step-label { font-size: 15px; font-weight: 500; line-height: 1.35; color: var(--ink); }
.st-step--open .st-step-label { color: var(--muted); }
.st-step-date { font-size: 13.5px; color: var(--muted); }
.st-step-link { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.st-step-link:hover { text-decoration-color: var(--ink); }

/* Animation des Statusbalkens: Punkte und Linien füllen sich nacheinander, sobald das Ergebnis sichtbar ist (JS setzt .is-run) */
html.js .st-step-dot { transition: color .3s ease, background-color .3s ease, border-color .3s ease, opacity .3s ease; transition-delay: calc(var(--i, 0) * .42s + .2s); }
html.js .st-step-dot .icon { transition: transform .3s cubic-bezier(.3,1.6,.5,1), opacity .2s ease; transition-delay: calc(var(--i, 0) * .42s + .25s); }
html.js .st-step::after { transition: transform .4s cubic-bezier(.45,0,.25,1); transition-delay: calc(var(--i, 0) * .42s + .38s); }
html.js .st-steps:not(.is-run) .st-step--done .st-step-dot { color: var(--muted); background: #fff; border-color: var(--line-2); }
html.js .st-steps:not(.is-run) .st-step-dot .icon { transform: scale(.3); opacity: 0; }
html.js .st-steps:not(.is-run) .st-step--current .st-step-dot,
html.js .st-steps:not(.is-run) .st-step--external .st-step-dot { opacity: .3; }
html.js .st-steps:not(.is-run) .st-step--done::after { transform: scaleX(0); }
html.js .st-steps.is-run .st-step--done .st-step-dot { animation: st-pop .45s ease calc(var(--i, 0) * .42s + .2s) both; }
html.js .st-steps.is-run .st-step--current .st-step-dot { animation: st-pulse 1.8s ease-out calc(var(--i, 0) * .42s + .5s) infinite; }
@keyframes st-pop { 0%, 100% { transform: scale(1); } 45% { transform: scale(1.16); } }
@keyframes st-pulse { 0% { box-shadow: 0 0 0 0 rgba(224,168,0,.45); } 70%, 100% { box-shadow: 0 0 0 10px rgba(224,168,0,0); } }
@media (prefers-reduced-motion: reduce) {
    html.js .st-step-dot, html.js .st-step-dot .icon, html.js .st-step::after { transition: none; }
    html.js .st-steps .st-step-dot { animation: none !important; }
}

.st-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; background: var(--surface); }
.st-facts > div { padding: 18px 20px; border-left: 1px solid #fff; }
.st-facts > div:first-child { border-left: 0; }
.st-facts dt { margin-bottom: 6px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.st-facts dd { margin: 0; font-size: 16.5px; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }

.st-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; margin-top: 24px; align-items: start; }
.st-parcels { padding: clamp(24px, 3vw, 40px); background: #fff; border: 1px solid var(--line); }
.st-h3 { margin: 0 0 8px; font-family: var(--f-display); font-stretch: 94%; font-weight: 500; font-size: 22px; letter-spacing: -0.012em; color: var(--ink); }
.st-sublead { margin: 0 0 22px; font-size: 15px; line-height: 1.6; color: var(--text); }
.st-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.st-parcel { display: grid; grid-template-columns: 48px minmax(0, 1fr) 290px 200px; gap: 12px 20px; align-items: center; padding: 16px 18px; border: 1px solid var(--line); transition: border-color .2s ease; }
.st-parcel:hover { border-color: var(--line-2); }
.st-parcel--live { grid-template-columns: 48px minmax(0, 1fr) 290px; }
.st-parcel-ico { display: grid; place-items: center; width: 48px; height: 48px; color: var(--ink); background: var(--surface); }
.st-k { display: block; margin-bottom: 3px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.st-parcel-none { font-size: 15px; font-weight: 400; color: var(--muted); }
.st-parcel-nr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 16.5px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.st-parcel-meta { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; white-space: nowrap; font-size: 15px; color: var(--ink); }
.st-copy { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; font: inherit; font-size: 12.5px; font-weight: 500; color: var(--muted); background: none; border: 1px solid transparent; border-radius: 2px; cursor: pointer; }
.st-copy:hover, .st-copy:focus-visible { color: var(--ink); border-color: var(--line-2); }
.st-copy.is-done, .btn.is-done { color: #1E5A30; }
.btn-dark.is-done { color: #fff; background: #2E7D46; }
.st-parcel-act { text-align: right; }
.st-parcel-act .btn { white-space: nowrap; }

/* Live-Status beim Versanddienstleister (hp_ship_live) */
.st-live { grid-column: 1 / -1; padding: 14px 0 0 68px; border-top: 1px solid var(--line); }
.st-live-now { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.st-live-dot { align-self: center; flex: none; width: 9px; height: 9px; border-radius: 50%; background: #E0A800; box-shadow: 0 0 0 4px rgba(224,168,0,.18); }
.st-live.is-delivered .st-live-dot { background: #2E7D46; box-shadow: 0 0 0 4px rgba(46,125,70,.16); }
.st-live.is-note .st-live-status { color: #6B4A00; }
.st-live-status { font-size: 16px; font-weight: 600; color: var(--ink); }
.st-live-meta { font-size: 14px; color: var(--muted); }
.st-live-hist { margin-top: 10px; }
.st-live-hist summary { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--ink); cursor: pointer; list-style: none; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; }
.st-live-hist summary::-webkit-details-marker { display: none; }
.st-live-hist summary::after { content: ""; width: 7px; height: 7px; margin-top: -3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .2s ease; }
.st-live-hist[open] summary::after { margin-top: 3px; transform: rotate(-135deg); }
.st-live-list { position: relative; display: grid; gap: 0; margin: 14px 0 0; padding: 0; list-style: none; }
.st-live-list li { position: relative; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 4px 18px; padding: 0 0 14px 22px; }
.st-live-list li::before { content: ""; position: absolute; left: 3px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--line-2); }
.st-live-list li::after { content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.st-live-list li:last-child { padding-bottom: 0; }
.st-live-list li:last-child::after { display: none; }
.st-live-list li:first-child::before { background: var(--ink); }
.st-live-list li.is-note::before { background: #E0A800; }
.st-live-list li.is-note .st-live-x { color: #6B4A00; }
.st-live-t { font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-live-x { font-size: 14.5px; line-height: 1.45; color: var(--ink); }
.st-live-x small { display: block; font-size: 13px; color: var(--muted); }
.st-live-src { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }

.st-aside { display: grid; gap: 16px; }
.st-box { padding: 24px; background: #fff; border: 1px solid var(--line); }
.st-box-title { margin: 0 0 8px; font-size: 16px; font-weight: 600; color: var(--ink); }
.st-box p { margin: 0 0 14px; font-size: 14.5px; line-height: 1.6; color: var(--text); }
.st-box p:last-child { margin-bottom: 0; }
.st-linkrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.st-linkrow input { min-width: 0; min-height: 42px; padding: 0 12px; font-size: 13px; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 2px; }
.st-linkrow .btn { gap: 8px; }
.st-box-links { display: grid; gap: 8px; }
.st-box-links a { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; color: var(--ink); }
.st-box-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.st-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 500; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; }
.st-link:hover { text-decoration-color: var(--ink); }

/* ---------- Meldungen ---------- */
.st-msg { display: flex; gap: 18px; max-width: 860px; padding: clamp(24px, 3vw, 36px); background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--accent); }
.st-msg--warn { border-left-color: #E0A800; }
.st-msg-ico { flex: none; display: grid; place-items: center; width: 40px; height: 40px; color: var(--accent); background: #FBEAEC; border-radius: 50%; }
.st-msg--warn .st-msg-ico { color: #6B4A00; background: #FFF4D6; }
.st-msg-title { margin: 6px 0 12px; font-family: var(--f-display); font-stretch: 94%; font-weight: 500; font-size: clamp(20px, 1.8vw, 26px); letter-spacing: -0.012em; color: var(--ink); }
.st-msg p { margin: 0 0 10px; font-size: 15.5px; line-height: 1.65; color: var(--text); }
.st-msg-note { font-weight: 600; color: var(--ink) !important; }
.st-msg-help { margin-top: 18px !important; padding-top: 18px; border-top: 1px solid var(--line); }

/* ---------- Versandarten ---------- */
.st-ship .section-head { margin-bottom: clamp(28px, 3vw, 44px); }
.st-ship-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.st-ship-item { padding: 28px; background: #fff; border: 1px solid var(--line); }
.st-ship-ico { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 20px; color: var(--ink); background: var(--surface); }
.section--surface .st-ship-ico { background: var(--surface); }
.st-ship-t { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 10px; font-family: var(--f-display); font-stretch: 94%; font-weight: 500; font-size: 21px; letter-spacing: -0.012em; color: var(--ink); }
.st-ship-c { font-family: var(--f-body); font-stretch: 100%; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.st-ship-item p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--text); }

@media (max-width: 1280px) {
    .st-parcel { grid-template-columns: 48px minmax(0, 1fr) auto; }
    .st-parcel-meta { grid-column: 2; grid-row: 2; }
    .st-parcel-act { grid-column: 3; grid-row: 1 / span 2; }
    .st-live { grid-row: 3; }
    .st-parcel--live { grid-template-columns: 48px minmax(0, 1fr); }
}
@media (max-width: 1000px) {
    .st-hero-grid, .st-grid { grid-template-columns: minmax(0, 1fr); }
    .st-ship-grid { grid-template-columns: minmax(0, 1fr); }
    .st-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .st-facts > div:nth-child(3) { border-left: 0; }
    .st-facts > div:nth-child(n+3) { border-top: 1px solid #fff; }
}
@media (max-width: 760px) {
    .st-steps { grid-template-columns: minmax(0, 1fr); gap: 0; margin: 28px 0; }
    .st-step { display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 16px; padding: 0 0 22px; }
    .st-step::before { left: 15px; right: auto; top: 34px; bottom: 0; width: 2px; height: auto; }
    .st-step::after { left: 15px; right: auto; top: 34px; bottom: 0; width: 2px; height: auto; transform-origin: center top; transform: scaleY(0); }
    .st-step--done:not(:last-child)::after { transform: scaleY(1); }
    html.js .st-steps:not(.is-run) .st-step--done::after { transform: scaleY(0); }
    .st-step-dot { grid-row: 1 / span 2; margin: 0; }
    .st-step-label { padding-top: 5px; }
    .st-step-date { grid-column: 2; }
}
@media (max-width: 640px) {
    .ct-direct.st-direct { grid-template-columns: minmax(0, 1fr); }
    .st-parcel { grid-template-columns: minmax(0, 1fr); padding: 16px; }
    .st-parcel-ico { display: none; }
    .st-parcel-meta, .st-parcel-act { grid-column: 1; grid-row: auto; }
    .st-parcel-meta { white-space: normal; }
    .st-parcel-act { text-align: left; }
    .st-parcel-act .btn { width: 100%; justify-content: space-between; }
    .st-live { padding-left: 0; }
    .st-live-list li { grid-template-columns: minmax(0, 1fr); }
    .st-facts { grid-template-columns: minmax(0, 1fr); }
    .st-facts > div { border-left: 0; border-top: 1px solid #fff; }
    .st-facts > div:first-child { border-top: 0; }
    .st-msg { flex-direction: column; gap: 10px; }
}
