/* Shipment cockpit. Uses the site's theme and the existing tracking data. */
.rf-flight-deck { display: grid; grid-template-columns: minmax(360px, .9fr) minmax(0, 1.3fr); border: 1px solid var(--rf-line); border-radius: var(--rf-radius-lg); background: var(--rf-surface); margin-bottom: 20px; overflow: hidden; isolation: isolate; }
.rf-flight-panel { position: relative; z-index: 2; min-width: 0; padding-bottom: 22px; background: radial-gradient(ellipse at 50% 32%, color-mix(in srgb, var(--rf-accent) 9%, transparent), transparent 48%), var(--rf-surface); border-inline-end: 1px solid var(--rf-line); }
.rf-flight-status { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 7px; min-height: 38px; padding: 9px 18px; color: var(--rf-a300); background: color-mix(in srgb, var(--rf-accent) 12%, transparent); font-size: 11px; font-weight: 800; }
.rf-flight-status time { font-size: 10px; color: var(--rf-muted); font-weight: 600; }
.rf-flight-status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--rf-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--rf-accent) 12%, transparent); margin-inline-end: 4px; }
.rf-flight-identity { text-align: center; padding: 24px 20px 0; }
.rf-flight-mode { display: inline-flex; align-items: center; gap: 7px; color: var(--rf-a300); background: var(--rf-bg); border: 1px solid var(--rf-line); border-radius: 30px; padding: 6px 12px; font-size: 11px; margin-bottom: 20px; }
.rf-flight-mode i { font-size: 18px; }
.rf-flight-identity .rf-head__label { font-size: 9px; letter-spacing: .18em; }
.rf-flight-identity h1 { font-size: clamp(25px, 2.5vw, 36px); font-weight: 500; letter-spacing: .04em; margin: 8px 0 0; overflow-wrap: anywhere; }
@keyframes rf-vessel-drift { 0%, 100% { transform: translateY(2px) rotate(-1deg); } 50% { transform: translateY(-3px) rotate(1deg); } }
.rf-flight-carrier { position: relative; text-align: center; padding: 0 20px 22px; }
.rf-flight-brand { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; background: var(--rf-a800); color: var(--rf-a100); font-size: 19px; margin-bottom: 10px; }
.rf-flight-carrier h2 { margin: 0; font-size: 14px; font-weight: 600; }
.rf-flight-carrier p { margin: 5px 0 0; font-size: 11px; color: var(--rf-muted); }
.rf-flight-stations { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; position: relative; margin: 0 22px 24px; }
.rf-flight-stations > div { min-width: 0; border: 1px solid var(--rf-line); border-radius: 10px; padding: 16px 14px; background: color-mix(in srgb, var(--rf-text) 3%, var(--rf-surface)); }
.rf-flight-stations > div > span { display: flex; gap: 5px; color: var(--rf-a300); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.rf-flight-stations h3 { min-height: 38px; font-size: 13px; line-height: 1.5; margin: 9px 0 12px; overflow-wrap: anywhere; }
.rf-flight-stations p { margin: 0 0 6px; padding-top: 12px; border-top: 1px solid var(--rf-line); color: var(--rf-muted); font-size: 10px; }
.rf-flight-stations strong { font-size: 11px; font-weight: 600; }
.rf-station-connector { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; height: 28px; width: 28px; border: 1px solid var(--rf-line); border-radius: 50%; background: var(--rf-surface); color: var(--rf-accent); font-size: 16px; }
.rf-flight-route { border-top: 1px solid var(--rf-line); padding: 22px 22px 18px; }
.rf-flight-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 22px; }
.rf-flight-section-heading h2 { font-size: 13px; margin: 0; }
.rf-flight-section-heading > span { font-size: 10px; color: var(--rf-muted); }
.rf-flight-stages { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); padding: 0; margin: 0; list-style: none; gap: 4px; }
.rf-flight-stages li { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.rf-flight-stages li::after { content: ''; position: absolute; inset-inline-start: calc(50% + 18px); width: calc(100% - 32px); height: 2px; background: var(--rf-line); top: 16px; }
.rf-flight-stages li:last-child::after { display: none; }
.rf-flight-stages li > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--rf-line); background: var(--rf-bg); color: var(--rf-muted); font-size: 18px; margin-bottom: 10px; }
.rf-flight-stages li.is-done::after { background: var(--rf-accent); }
.rf-flight-stages li.is-done > span { color: var(--rf-a300); background: color-mix(in srgb, var(--rf-accent) 10%, transparent); }
.rf-flight-stages li.is-now > span { color: #fff; background: var(--rf-accent); border-color: var(--rf-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--rf-accent) 16%, transparent); }
.rf-flight-stages strong { font-size: 9px; font-weight: 600; line-height: 1.5; }
.rf-flight-stages small { color: var(--rf-muted); font-size: 9px; margin-top: 4px; }
.rf-flight-stages .is-now small { color: var(--rf-a300); }
.rf-flight-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 22px 0; }
.rf-flight-facts > div { padding: 16px; border: 1px solid var(--rf-line); border-radius: 10px; }
.rf-flight-facts i { color: var(--rf-a300); font-size: 20px; }
.rf-flight-facts p { margin: 12px 0 4px; font-size: 11px; color: var(--rf-muted); }
.rf-flight-facts strong { font-size: 20px; font-family: var(--rf-font-heading); font-weight: 500; }
.rf-flight-facts strong span { font-size: 10px; color: var(--rf-muted); font-family: var(--rf-font-body); }
.rf-flight-history-link { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 20px; color: var(--rf-a300); font-size: 11px; font-weight: 700; }
.rf-flight-map { position: relative; z-index: 1; display: flex; flex-direction: column; min-width: 0; min-height: 700px; background: var(--rf-bg); --rf-map-land: #303242; --rf-map-border: #45475a; --rf-map-ocean: #1c1e2b; --rf-map-label: #9b9eaf; }
html[data-rf-theme="light"] .rf-flight-map { --rf-map-land: #d8dbe9; --rf-map-border: #bcc1d5; --rf-map-ocean: #edf0f8; --rf-map-label: #6b728c; }
.rf-track .rf-flight-map #rf-map { position: absolute; inset: 0; height: 100%; width: 100%; background: var(--rf-map-ocean); z-index: 0; }
.rf-flight-map-heading { position: relative; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 30px; pointer-events: none; background: linear-gradient(var(--rf-map-ocean), transparent); }
.rf-flight-map-heading h2 { font-size: clamp(22px, 2.5vw, 34px); line-height: 1.25; margin: 12px 0 0; letter-spacing: -.04em; }
.rf-map-fit { pointer-events: auto; display: grid; place-items: center; flex: 0 0 38px; height: 38px; border: 1px solid var(--rf-line); border-radius: 12px; background: var(--rf-surface); color: var(--rf-text); font-size: 22px; cursor: pointer; }
.rf-map-fit[hidden] { display: none; }
.rf-flight-map .leaflet-control-zoom { border: 1px solid var(--rf-line); border-radius: 12px; overflow: hidden; box-shadow: none; margin: 0 22px 180px 0; }
.rf-flight-map .leaflet-control-zoom a { background: var(--rf-surface); color: var(--rf-text); border-color: var(--rf-line); width: 36px; height: 36px; line-height: 36px; }
.rf-flight-map .leaflet-control-attribution { background: var(--rf-surface); color: var(--rf-muted); font-size: 9px; }
.rf-flight-map .leaflet-control-attribution a { color: var(--rf-a300); }
.rf-flight-map-footer { position: relative; z-index: 1; margin: auto 24px 30px; padding: 18px; border: 1px solid var(--rf-line); border-radius: 12px; background: color-mix(in srgb, var(--rf-surface) 94%, transparent); backdrop-filter: blur(12px); }
.rf-flight-map-route { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.rf-flight-map-route > span { flex: 1; min-width: 0; }
.rf-flight-map-route > span:last-child { text-align: end; }
.rf-flight-map-route small { display: block; font-size: 9px; letter-spacing: .1em; color: var(--rf-muted); margin-bottom: 8px; }
.rf-flight-map-route strong { font-size: 12px; line-height: 1.5; }
.rf-flight-map-route > i { color: var(--rf-accent); font-size: 25px; }
.rf-flight-map-footer p { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--rf-line); font-size: 10px; color: var(--rf-muted); }
.rf-flight-map .rf-map-fallback.show { position: absolute; inset: 22% 10% 25%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: transparent; }
.rf-flight-map .rf-map-fallback > i { font-size: 90px; color: var(--rf-a300); opacity: .6; }
.rf-flight-map .rf-map-fallback h3 { font-size: 18px; color: var(--rf-text); }
.rf-map-country-label { font: 10px var(--rf-font-body); color: var(--rf-map-label); text-align: center; white-space: nowrap; pointer-events: none; }
.rf-track .rf-flight-tools { padding: 14px 20px; gap: 12px; }
.rf-flight-tools .rf-head__chips { flex: 1 1 260px; order: 0; }
.rf-flight-tools .rf-head__side .rf-updated { display: none; }
#shipment-history { scroll-margin-top: 90px; }
.rf-flight-history-link:focus-visible, .rf-map-fit:focus-visible { outline: 2px solid var(--rf-accent); outline-offset: 4px; }
@media (min-width: 1600px) { .rf-flight-deck { grid-template-columns: minmax(400px, .8fr) minmax(0, 1.4fr); } }
@media (max-width: 1100px) { .rf-flight-deck { grid-template-columns: minmax(330px, 1fr) minmax(0, 1fr); } .rf-flight-map-heading { padding: 24px; } .rf-flight-stations, .rf-flight-facts { margin-inline: 16px; } .rf-flight-route { padding-inline: 16px; } }
@media (max-width: 767px) { .rf-flight-deck { grid-template-columns: 1fr; } .rf-flight-panel { border-inline-end: 0; } .rf-flight-map { min-height: 500px; border-top: 1px solid var(--rf-line); } .rf-flight-map-footer { margin: auto 16px 26px; } .rf-flight-identity h1 { font-size: 28px; } .rf-flight-stages strong { font-size: 9px; } .rf-flight-map-heading h2 { font-size: 26px; } }
@media print { .rf-flight-deck { display: block; overflow: visible; } .rf-flight-map, .rf-flight-history-link { display: none; } }
.rf-flight-motion { display: flex; align-items: center; gap: 5px; margin: -5px auto 14px; position: relative; z-index: 2; border: 0; background: transparent; color: var(--rf-muted); font: inherit; font-size: 10px; cursor: pointer; }
.rf-flight-motion[hidden] { display: none; }
.rf-flight-motion:focus-visible { outline: 2px solid var(--rf-accent); outline-offset: 4px; }
/* Compact card columns remove the empty track below a short event history. */
.rf-details-grid { columns: 2; column-gap: 20px; }
.rf-track .rf-details-grid > .rf-card { display: block; width: 100%; margin: 0 0 20px; break-inside: avoid; }
.rf-details-grid .rf-tl li:last-child { padding-bottom: 0; min-height: 44px; }
.rf-route-country { display: inline-flex; align-items: center; vertical-align: middle; margin-inline-end: 7px; color: var(--rf-a300); }
.rf-route-country img { display: inline-block; width: 24px; height: 18px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px var(--rf-line); }
.rf-flight-payment { margin: 20px 22px 0; padding: 16px; border: 1px solid var(--rf-line); border-radius: 10px; background: color-mix(in srgb, var(--rf-accent) 5%, var(--rf-surface)); }
.rf-flight-payment > div:first-child { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.rf-flight-payment > div:first-child i { font-size: 22px; color: var(--rf-a300); }
.rf-flight-payment > div:first-child strong { margin-inline-start: auto; font-size: 11px; color: var(--rf-a300); }
.rf-flight-payment > p { font-size: 24px; font-weight: 600; margin: 16px 0; }
.rf-flight-payment > p small { display: block; color: var(--rf-muted); font-size: 11px; font-weight: 400; margin-top: 5px; }
.rf-flight-payment > .rf-payment-pending { font-size: 12px; color: var(--rf-muted); font-weight: 400; line-height: 1.6; }
.rf-payment-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.rf-payment-actions a { color: var(--rf-a300); font-size: 11px; font-weight: 700; }
.rf-payment-actions a.rf-btn { color: #fff; }
#shipment-payments { scroll-margin-top: 90px; }
.rf-payment-history { border-top: 1px solid var(--rf-line); padding-top: 18px; margin-top: 20px; }
.rf-payment-history h3 { font-size: 14px; margin: 0 0 8px; }
.rf-payment-history h3 i { color: var(--rf-accent); margin-inline-end: 6px; }
.rf-payment-history > p, .rf-payment-empty { color: var(--rf-muted); font-size: 11px; line-height: 1.6; }
.rf-payment-history ul { list-style: none; padding: 0; margin: 14px 0 0; }
.rf-payment-history li { display: flex; align-items: flex-start; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--rf-line); }
.rf-payment-history li:last-child { border-bottom: 0; padding-bottom: 0; }
.rf-payment-history li > div { min-width: 0; }
.rf-payment-record-icon { display: grid; place-items: center; flex: 0 0 30px; height: 30px; border-radius: 9px; background: var(--rf-bg); color: var(--rf-a300); font-size: 18px; }
.rf-payment-history strong { font-size: 12px; }
.rf-payment-history time, .rf-payment-reference { display: block; font-size: 10px; color: var(--rf-muted); margin-top: 4px; overflow-wrap: anywhere; }
.rf-payment-record-amount { margin-inline-start: auto; text-align: end; font-size: 13px; font-weight: 700; }
.rf-payment-record-amount small { display: block; color: var(--rf-muted); font-size: 10px; font-weight: 400; margin-top: 5px; }
@media (max-width: 767px) { .rf-details-grid { columns: 1; } .rf-flight-payment { margin-inline: 16px; } }
/* Each milestone has its own scene and moving action layer. */
.rf-stage-visual { margin: 18px 20px 10px; }
/* A neutral, see-through grey ground (owner, 2026-11-07): translucent grey
   reads light grey on the white theme and charcoal on the dark one, so the
   illustrations blend into either card instead of sitting on a tinted box. */
.rf-stage-scene { --rf-stage-ground: rgb(128 128 128 / .14); position: relative; aspect-ratio: 3 / 2; width: 100%; overflow: hidden; isolation: isolate; border-radius: 16px; background: var(--rf-stage-ground); }
.rf-stage-glow { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 70%, rgb(128 128 128 / .16), transparent 68%); }
.rf-stage-image { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; }
/* The cut-outs sit on the grey with a soft floor shadow. */
.rf-stage-scene--received .rf-stage-image, .rf-stage-scene--delivered .rf-stage-image, .rf-stage-scene--pickup .rf-stage-image { filter: drop-shadow(0 10px 14px rgb(0 0 0 / .18)); -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%); }
/* Loading and arrival are full photographs with their own sky; their edges
   dissolve into the grey so no hard rectangle of blue sits on the card. */
.rf-stage-scene--loading .rf-stage-image, .rf-stage-scene--arrival .rf-stage-image { -webkit-mask-image: radial-gradient(ellipse 78% 76% at 50% 50%, #000 68%, transparent 100%); mask-image: radial-gradient(ellipse 78% 76% at 50% 50%, #000 68%, transparent 100%); opacity: .96; }
.rf-stage-visual figcaption { text-align: center; font-size: 11px; font-weight: 700; color: var(--rf-a300); margin-top: 12px; }
.rf-stage-parcel { position: absolute; z-index: 2; left: 40%; top: 59%; width: 21%; height: 20%; filter: drop-shadow(0 4px 4px #0003); animation: rf-parcel-handover 7s ease-in-out infinite; }
.rf-stage-parcel img { display: block; width: 100%; height: 100%; object-fit: contain; }
.rf-stage-confirmed { position: absolute; z-index: 3; right: 10%; bottom: 10%; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--rf-surface); background: var(--rf-a300); box-shadow: 0 0 0 5px color-mix(in srgb, var(--rf-accent) 14%, transparent); animation: rf-handover-confirmed 7s ease-in-out infinite; }
@keyframes rf-parcel-handover { 0%, 12% { opacity: 1; transform: translateX(-24%) rotate(-4deg); } 20%, 32% { opacity: 1; transform: translateX(-24%) rotate(-4deg); } 68%, 88% { opacity: 1; transform: translateX(24%) rotate(2deg); } 96%, 100% { opacity: 0; transform: translateX(24%) rotate(2deg); } }
@keyframes rf-handover-confirmed { 0%, 60% { opacity: 0; transform: scale(.7); } 72%, 88% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(.9); } }
.rf-stage-scene--loading .rf-stage-parcel { width: 11%; height: 12%; left: 24%; top: 67%; animation-name: rf-cargo-load; }
@keyframes rf-cargo-load { 0%, 10% { left: 24%; top: 67%; opacity: 0; transform: scale(1); } 20% { opacity: 1; } 75%, 90% { left: 59%; top: 34%; opacity: 1; transform: scale(.72); } 100% { left: 59%; top: 34%; opacity: 0; transform: scale(.72); } }
.rf-stage-scene--arrival .rf-stage-parcel { width: 11%; height: 12%; left: 36%; top: 34%; animation-name: rf-cargo-unload; }
@keyframes rf-cargo-unload { 0%, 10% { left: 36%; top: 34%; opacity: 0; transform: scale(.72); } 20% { opacity: 1; } 75%, 90% { left: 67%; top: 68%; opacity: 1; transform: scale(1); } 100% { left: 67%; top: 68%; opacity: 0; transform: scale(1); } }
.rf-stage-scene--airborne .rf-stage-image { position: absolute; inset: 10% 6%; width: 88%; height: 80%; z-index: 2; filter: drop-shadow(0 14px 10px #0003); animation: rf-stage-takeoff 9s ease-in-out infinite; }
@keyframes rf-stage-takeoff { 0% { opacity: 0; transform: translateY(12%) scale(.72); } 12% { opacity: 1; transform: translateY(12%) scale(.72); } 40% { opacity: 1; transform: translateY(-5%) scale(.96) rotate(-1deg); } 66% { transform: translateY(-7%) scale(.98) rotate(1deg); } 88% { opacity: 1; transform: translateY(-5%) scale(.96); } 100% { opacity: 0; transform: translateY(-9%) scale(.98); } }
.rf-stage-cloud { position: absolute; z-index: 1; width: 50%; height: 18%; border-radius: 50%; background: radial-gradient(ellipse, #ffffff8c, #ffffff00 70%); filter: blur(6px); animation: rf-cloud-travel 9s linear infinite; }
.rf-stage-cloud--back { top: 22%; left: 8%; }
.rf-stage-cloud--front { z-index: 3; bottom: 12%; left: 48%; animation-delay: -4s; opacity: .5; }
@keyframes rf-cloud-travel { from { transform: translateX(120%); opacity: 0; } 25%, 70% { opacity: .65; } to { transform: translateX(-180%); opacity: 0; } }
.rf-stage-runway { position: absolute; left: 38%; bottom: -12%; width: 24%; height: 55%; background: repeating-linear-gradient(to top, transparent 0 18px, var(--rf-faint) 18px 30px) center / 3px 100% no-repeat; transform: perspective(100px) rotateX(45deg); border-inline: 1px solid var(--rf-line); animation: rf-runway-recede 9s ease-in-out infinite; }
@keyframes rf-runway-recede { 0%, 12% { opacity: .8; transform: perspective(100px) rotateX(45deg) translateY(0); } 42%, 100% { opacity: 0; transform: perspective(100px) rotateX(45deg) translateY(65%); } }
.rf-stage-scene--sailing .rf-stage-image, .rf-stage-scene--sea-loading .rf-stage-image, .rf-stage-scene--sea-arrival .rf-stage-image { position: absolute; inset: 8%; width: 84%; height: 84%; }
.rf-stage-scene--sailing .rf-stage-image { animation: rf-vessel-drift 6s ease-in-out infinite; }
.rf-stage-waves { position: absolute; inset: auto -15% 9%; height: 13%; border-top: 2px solid var(--rf-a500); border-radius: 50%; opacity: .4; animation: rf-sea-waves 5s ease-in-out infinite alternate; }
@keyframes rf-sea-waves { from { transform: translate(-6%, 0); } to { transform: translate(6%, -5px); } }
.rf-stage-scene--sea-loading .rf-stage-parcel { width: 11%; height: 12%; animation-name: rf-cargo-load; }
.rf-stage-scene--sea-arrival .rf-stage-parcel { width: 11%; height: 12%; animation-name: rf-cargo-unload; }
.is-motion-paused .rf-stage-motion { animation-play-state: paused; }
@media (max-width: 767px) { .rf-stage-visual { margin-inline: 16px; } }
@media (prefers-reduced-motion: reduce) { .rf-stage-motion { animation: none !important; } .rf-stage-cloud, .rf-stage-runway, .rf-stage-waves { display: none; } .rf-stage-confirmed { opacity: 1; } }
@media print { .rf-stage-motion { animation: none !important; } .rf-stage-visual { max-width: 360px; margin-inline: auto; } .rf-stage-cloud, .rf-stage-runway, .rf-flight-motion { display: none; } }
