/* klevercargo.com — page styles on top of tokens.css. Layout lives inline in index.html, as in the design. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: #ffffff; font-family: var(--fontFamily); color: #0c2138; line-height: var(--lh-tight); -webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; }
a { color: #2586c5; text-decoration: none; }
a:hover { color: #005b9e; }
button, input, textarea { font-family: inherit; }
p { margin: 0; }
img { max-width: 100%; }
*::-webkit-scrollbar { height: 6px; width: 6px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #8f99a2; border-radius: 3px; }
:focus-visible { outline: 2px solid #2586c5; outline-offset: 2px; }
[hidden] { display: none !important; }

.dc { display: contents; }
@media (max-width: 899px) { .only-desktop { display: none !important; } }
@media (min-width: 900px) { .only-mobile { display: none !important; } }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 1000; background: #0c2138; color: #ffffff; padding: 8px 14px; border-radius: 4px; font-size: 13px; }
.skip-link:focus { top: 12px; color: #ffffff; }

@keyframes kcFadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes kcSway { from { transform: rotateY(16deg); } to { transform: rotateY(40deg); } }
@keyframes kcDrop { from { transform: translateY(-190px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes kcPulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes kcDrawerIn { from { transform: translate3d(100%, 0, 0); } to { transform: none; } }

/* ---------- Button (DS Button: primary / secondary) ---------- */
.kc-btn { display: inline-flex; justify-content: center; align-items: center; height: var(--buttonHeight); min-width: fit-content; padding: 0 var(--buttonPaddingX); border-radius: var(--buttonBorderRadius); font-size: var(--fs-body); font-family: var(--fontFamily); line-height: var(--lh-tight); white-space: nowrap; cursor: pointer; user-select: none; border: none; transition: all var(--transitionBase) ease; text-decoration: none; }
.kc-btn--primary { background: var(--primaryDark); color: var(--white); }
.kc-btn--primary:hover { background: var(--primaryHover); color: var(--white); }
.kc-btn--secondary { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.kc-btn--secondary:hover { background: var(--primary); color: var(--white); }
.kc-btn--block { width: 100%; }
.kc-btn--sm { height: 30px; padding: 0 14px; }
span.kc-btn { cursor: default; }
.kc-btn:disabled { background: var(--gray2); color: var(--secondaryText); border: none; cursor: not-allowed; }

/* ---------- Verification pill ---------- */
.kc-pill { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: var(--chipBorderRadius); font-size: var(--fs-meta); font-weight: var(--fw-semibold); white-space: nowrap; border: 1px solid; }
.kc-pill--approved { background: var(--verificationApprovedBg); border-color: var(--verificationApprovedBorder); color: var(--verificationApprovedColor); }
.kc-pill--pending { background: var(--verificationPendingBg); border-color: var(--verificationPendingBorder); color: var(--verificationPendingColor); }
.kc-pill--declined { background: var(--verificationDeclinedBg); border-color: var(--verificationDeclinedBorder); color: var(--verificationDeclinedColor); }

/* ---------- Route info ---------- */
.kc-route { display: flex; gap: var(--gap10, 10px); min-width: 0; }
.kc-route__rail { display: flex; flex-direction: column; align-items: center; min-width: 24px; }
.kc-route__flag { height: 15px; margin: 0 2px; box-shadow: 0 0 3px var(--gray3); flex: 0 0 auto; }
.kc-route__line { display: flex; flex-direction: column; align-items: center; height: 50px; margin: 5px 0; }
.kc-route__line span:nth-child(odd) { min-height: 6px; width: 6px; border-radius: 50%; background: var(--gray2); }
.kc-route__line span:nth-child(2) { height: 100%; border-left: 2px solid var(--gray2); }
.kc-route__stops { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; min-width: 0; }
.kc-route__stop { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.kc-route__country { color: var(--secondary); font-size: var(--fs-input); font-weight: var(--fw-medium); line-height: 21px; margin-top: -4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kc-route__place { color: var(--secondary); font-size: var(--fs-label); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kc-route__when { display: flex; align-items: center; gap: 8px; font-size: var(--fs-label); color: var(--secondary); }
.kc-route__when .is-ok { color: var(--success); }

/* ---------- KleverCargo Score ---------- */
.kc-credit { display: flex; flex-direction: column; gap: 5px; }
.kc-credit__bar { position: relative; height: 8px; border-radius: var(--pillRadius); background: var(--creditScoreGradient); }
.kc-credit__bar span { position: absolute; top: -4px; width: 16px; height: 16px; border-radius: 50%; background: var(--white); border: 2px solid var(--secondary); box-shadow: var(--switcherActiveShadow); }
.kc-credit__legend { display: flex; justify-content: space-between; color: var(--secondaryText); font-size: var(--fs-micro); }
.kc-credit__legend b { color: var(--secondary); font-weight: var(--fw-semibold); }
.kc-stat { display: flex; flex: 1 1 0; flex-direction: column; gap: 5px; min-width: 0; padding: 10px; border-radius: var(--cardBorderRadius); background: var(--white); box-shadow: var(--cardBoxShadow); }
.kc-stat__label { color: var(--secondaryText); font-size: var(--fs-micro); }
.kc-stat__value { color: var(--primary); font-size: var(--fs-body); font-weight: var(--fw-medium); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kc-stat--locked { background: var(--background); }
.kc-stat--locked .kc-stat__value { color: var(--secondaryText); }

/* ---------- Form fields ---------- */
.demo-form { display: flex; flex-direction: column; gap: 14px; }
.kc-drawer .demo-form { gap: 15px; padding: 20px 20px 0; }
.kc-field { display: flex; flex-direction: column; min-width: 0; }

.kc-field__label { display: inline-flex; align-items: center; gap: 2px; margin: 0 0 5px; color: var(--secondaryText); font-size: var(--fs-input); user-select: none; }
.kc-field__label--sm { font-size: var(--fs-label); }
.kc-req { color: #e53935; }
.kc-field__box { display: flex; align-items: center; width: 100%; height: var(--controlHeight); padding: 0 10px 0 3px; background: var(--white); border: 1px solid var(--borderFormElement); border-radius: var(--borderRadius); transition: border var(--transitionBase); }
.kc-field__box--lg { height: var(--controlHeightLarge); }
.kc-field__box:hover { border-color: var(--borderFormElementHover); }
.kc-field__box:focus-within { border-color: var(--borderFormElementFocus); }
.kc-field__input { flex: 1 1 0; min-width: 0; height: 100%; padding: 0 5px; border: none; background: transparent; outline: none; color: var(--secondary); font-size: var(--fs-input); }
.kc-textarea { padding: 10px; background: var(--white); border: 1px solid var(--borderFormElement); border-radius: var(--borderRadius); outline: none; resize: vertical; color: var(--secondary); font-size: var(--fs-label); line-height: var(--lh-normal); transition: border var(--transitionBase); }
.kc-textarea:hover { border-color: var(--borderFormElementHover); }
.kc-textarea:focus { border-color: var(--borderFormElementFocus); }
.kc-field__input::placeholder, .kc-textarea::placeholder { color: #a4adb6; opacity: 1; }
/* Under 16px, iOS Safari zooms the page when a field is focused. */
@media (max-width: 899px) { .kc-field__input, .kc-textarea { font-size: 16px; } }
.kc-field.is-invalid .kc-field__box { border-color: var(--danger, #e53935); }
.kc-field__error { margin-top: 4px; color: var(--danger, #e53935); font-size: var(--fs-micro); }
.demo-form__consent { display: flex; align-items: flex-start; gap: 9px; font-size: 12px; line-height: 1.5; color: #425264; cursor: pointer; }
.demo-form__consent input { flex: 0 0 auto; width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--primaryDark); cursor: pointer; }
.demo-form__consent a { color: #2586c5; }
.demo-form__error { margin: 0; padding: 9px 12px; border-radius: var(--borderRadius); background: var(--verificationDeclinedBg); color: var(--verificationDeclinedColor); font-size: 12px; line-height: 1.5; }
/* Off-screen, not display:none: some bots skip fields that are not rendered. */
.demo-form__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Drawer (DS Drawer, tone primary) ---------- */
.kc-drawer__scrim { position: absolute; inset: 0; background: var(--drawerScrim); backdrop-filter: var(--scrimBlur); }
.kc-drawer__panel { position: absolute; top: var(--formDrawerWrapperGap); bottom: var(--formDrawerWrapperGap); right: 0; display: flex; flex-direction: column; width: 560px; max-width: 100%; border-radius: var(--drawerRadius) 0 0 var(--drawerRadius); background: var(--white); overflow: hidden; animation: kcDrawerIn var(--formDrawerAnimationTime) forwards; }
.kc-drawer__head { display: flex; justify-content: space-between; align-items: center; flex: 0 0 auto; min-height: var(--formDrawerHeaderHeight); padding: 9px 20px; background: linear-gradient(48deg, #005b9e 0%, #007dc1 100%); color: var(--white); box-shadow: inset 0 -1px 1px 0 rgba(0, 0, 0, .65); text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.kc-drawer__head h2 { margin: 0; font-size: var(--fs-input); font-weight: var(--fw-regular); line-height: 22px; }
.kc-drawer__close { display: flex; padding: 6px; margin-right: -6px; border: 0; background: transparent; color: var(--white); opacity: .9; cursor: pointer; }
.kc-drawer__close:hover { opacity: 1; }
.kc-drawer__body { flex: 1 1 0; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; }
@media (max-width: 600px) { .kc-drawer__panel { top: 0; bottom: 0; border-radius: 0; } }

@media (max-width: 520px) { [data-rotate-hint] { display: none !important; } }

/* Cost table rows: name over the figures on a phone. */
@media (max-width: 520px) {
  .kc-costrow { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto !important; row-gap: 6px !important; }
  .kc-costrow > :first-child { grid-column: 1 / -1; }
  .kc-costrow > :nth-child(2) { text-align: left !important; }
}

header a[aria-current="page"], [data-show] a[aria-current="page"] { background: #f1f4f6; }
footer a[aria-current="page"] { color: #2586c5 !important; }

/* Long words (German compounds, Greek, Hungarian) must break rather than widen the page. */
body { overflow-wrap: anywhere; }
/* On a phone a long word is hyphenated (pages carry their lang) before it is broken anywhere. */
@media (max-width: 599px) { body { hyphens: auto; } }
/* Header call to action: in languages with a long label it wraps instead of pushing past the screen edge. */
@media (max-width: 480px) {
  header .kc-btn { height: auto; min-height: 34px; min-width: 0; max-width: 46vw; padding: 6px 12px; white-space: normal; text-align: center; line-height: 1.15; font-size: 12px; }
}

/* ---------- Languages ---------- */
.kc-lang { position: relative; }
.kc-lang > summary { display: inline-flex; align-items: center; gap: 6px; height: 35px; padding: 0 10px; border-radius: 4px; color: #425264; font-size: 13px; font-weight: 500; cursor: pointer; list-style: none; user-select: none; }
.kc-lang > summary::-webkit-details-marker { display: none; }
.kc-lang > summary:hover, .kc-lang[open] > summary { color: #2586c5; background: #f1f4f6; }
.kc-lang__list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 120; margin: 0; padding: 6px; list-style: none; width: 220px; max-height: min(70vh, 520px); overflow-y: auto; background: #ffffff; border: 1px solid #e4e6e8; border-radius: 8px; box-shadow: 0 12px 24px -12px rgba(12, 33, 56, .3); }
.kc-lang__list a { display: block; padding: 8px 10px; border-radius: 6px; color: #0c2138; font-size: 13px; }
.kc-lang__list a:hover { background: #f1f4f6; color: #0c2138; }
.kc-lang__list a[aria-current] { color: #2586c5; font-weight: 600; }
.kc-mobile-langs { padding: 0 6px 16px; }
.kc-mobile-langs .kc-lang > summary { height: 44px; padding: 0 10px; font-size: 13px; font-weight: 600; color: #0c2138; }
.kc-mobile-langs .kc-lang__list { position: static; width: auto; max-height: none; box-shadow: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; }
.kc-footer-langs { display: flex; flex-wrap: wrap; gap: 4px 14px; max-width: 1140px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 24px) 28px; font-size: 12px; }
.kc-footer-langs a { color: #667485; }
.kc-footer-langs a:hover, .kc-footer-langs a[aria-current] { color: #2586c5; }
.kc-legal-note { margin: 0 0 24px; padding: 12px 14px; border-radius: 8px; background: #f1f4f6; border: 1px solid #e4e6e8; color: #425264; font-size: 13px; line-height: 1.5; }

/* ---------- Touch targets ---------- */
.kc-textlink { position: relative; }
.kc-textlink::after { content: ''; position: absolute; inset: -10px -6px; }
@media (max-width: 899px) {
  footer a { padding: 6px 0; }
}

/* ---------- Demo modal ---------- */
@keyframes kcModalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes kcScrimIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes kcSheetIn { from { transform: translateY(100%); } to { transform: none; } }
.kc-modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px; }
.kc-modal__scrim { position: absolute; inset: 0; background: rgba(12, 33, 56, .55); backdrop-filter: blur(3px); animation: kcScrimIn .2s ease; }
.kc-modal__card { position: relative; display: grid; grid-template-columns: 330px minmax(0, 1fr); width: min(940px, 100%); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); background: #ffffff; border-radius: 16px; overflow: hidden; box-shadow: 0 30px 80px -20px rgba(12, 33, 56, .5); animation: kcModalIn .28s cubic-bezier(.2, .8, .2, 1); }
.kc-modal__aside { display: flex; flex-direction: column; gap: 16px; padding: 36px 30px; color: #ffffff; background: radial-gradient(120% 80% at 0% 0%, rgba(37, 134, 197, .35), transparent 60%), linear-gradient(160deg, #0c2138 0%, #102b4a 100%); }
.kc-modal__eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #ffc60a; }
.kc-modal__title { margin: 0; font-size: 25px; line-height: 1.2; font-weight: 600; color: #ffffff; }
.kc-modal__lead { margin: 0; font-size: 14px; line-height: 1.6; color: #b9c3cc; }
.kc-modal__fact { display: flex; align-items: center; gap: 9px; font-size: 13px; color: #ffffff; }
.kc-modal__fact img { width: 16px; height: 16px; filter: brightness(0) invert(1); opacity: .85; }
.kc-modal__trust { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 11px; line-height: 1.5; color: #8fa0b3; }
.kc-modal__badge { align-self: flex-start; padding: 3px 8px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 4px; font-weight: 600; color: #ffffff; }
.kc-modal__main { position: relative; min-width: 0; padding: 36px 32px 28px; overflow-y: auto; }
.kc-modal__close { position: absolute; top: 14px; right: 14px; z-index: 2; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: #425264; cursor: pointer; transition: background .15s ease, color .15s ease; }
.kc-modal__close:hover { background: #f1f4f6; color: #0c2138; }
.kc-modal .demo-form { gap: 16px; }
.kc-modal__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.kc-modal .kc-field__label { font-size: 13px; color: #425264; }
.kc-modal .kc-textarea { min-height: 96px; }
.kc-modal__actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 4px; }
.kc-modal__actions .kc-btn { min-width: 140px; }
.kc-modal__done { display: flex; flex-direction: column; align-items: center; gap: 12px; min-height: 100%; justify-content: center; padding: 48px 12px; text-align: center; }
.kc-modal__check { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; background: #e4f0e4; color: #3e7c3c; margin-bottom: 4px; animation: kcModalIn .35s cubic-bezier(.2, .8, .2, 1); }
.kc-modal__done-title { margin: 0; font-size: 20px; font-weight: 600; color: #0c2138; }
.kc-modal__done-text { margin: 0 0 8px; max-width: 34ch; font-size: 14px; line-height: 1.55; color: #425264; }
.kc-modal__main:has([data-demo-done]:not([hidden])) { display: grid; }
@media (max-width: 760px) {
  /* A full-screen form on a phone: header fixed at the top, fields scroll, actions stay at the bottom. */
  .kc-modal { padding: 0; place-items: stretch; }
  .kc-modal__card { display: flex; flex-direction: column; width: 100%; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; animation: kcSheetIn .3s cubic-bezier(.2, .8, .2, 1); }
  .kc-modal__aside { flex: 0 0 auto; gap: 6px; padding: calc(18px + env(safe-area-inset-top)) 60px 16px 20px; }
  .kc-modal__title { font-size: 19px; }
  .kc-modal__lead, .kc-modal__trust { display: none; }
  .kc-modal__main { flex: 1 1 auto; min-height: 0; padding: 20px 20px 0; overflow-y: auto; -webkit-overflow-scrolling: touch; position: static; }
  .kc-modal__close { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; color: #ffffff; }
  .kc-modal__close:hover { background: rgba(255, 255, 255, .12); color: #ffffff; }
  .kc-modal__grid { grid-template-columns: 1fr; gap: 12px; }
  .kc-modal__actions { position: sticky; bottom: 0; margin: 4px -20px 0; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: #ffffff; border-top: 1px solid #e4e6e8; }
  .kc-modal__actions .kc-btn { flex: 1 1 0; min-width: 0; }
  .kc-modal__done { min-height: 100%; }
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Journey: the ship button's two labels, both translated; site.js toggles .is-shipping. */
[data-jship-busy], [data-jship].is-shipping [data-jship-idle] { display: none; }
[data-jship].is-shipping [data-jship-busy] { display: inline; }

/* Journey summary on phones: three rings a row, so the check, the figures and the buttons fit one screen. */
@media (max-width: 600px) {
  .kc-jdone { padding: 72px 12px 16px !important; }
  .kc-jdone > div { gap: 14px !important; }
  .kc-jdone__check { width: 56px !important; height: 56px !important; }
  .kc-jdone__rings { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 14px 6px !important; padding: 12px 0 !important; }
  .kc-jdone__ring, .kc-jdone__ring svg { width: 64px !important; height: 64px !important; }
  .kc-jdone__ring > div { font-size: 13px !important; }
  .kc-jdone__rings > div { gap: 5px !important; }
  .kc-jdone__rings > div > div:nth-child(2) { font-size: 12px !important; }
  .kc-jdone__note { font-size: 10px !important; }
}
@media (max-width: 600px) and (max-height: 720px) {
  .kc-jdone__check { width: 44px !important; height: 44px !important; }
  .kc-jdone__note { display: none !important; }
}

/* Two-column intros (Time slots, Documents): the list centres against the heading and text. */
.kc-split > :last-child { align-self: center; }
