/*ORIGIN DESTINATION*/
#from-station,
#arrow,
#to-station {
    display: table-cell;
}
#arrow {
    padding-right: 5px;
    padding-left: 5px;
}

/*CARGO IQ LOGO*/
#cargoiq {
    min-width: 100px;
    max-width: 150px;
}

/*SEARCH PANEL*/
.panel-search {
    background-color: #2780e3;
    border-style: none;
}
.panel-search > .panel-heading {
    color: #ffffff;
    background-color: #2780e3;
}
.panel-search > .panel-heading + .panel-collapse > .panel-body {
    border-top-color: #2780e3;
}
.panel-search > .panel-heading .badge {
    color: #ff0039;
    background-color: #ffffff;
}
#search-notice-container {
    margin-top: -21px
}

/*SEARCH/TIME/NOTIFICATION BUTTONS*/
.tnt-button {
    background-color: #1a2421;
    border-color: #1a2421;
}
.tnt-button:focus,
.tnt-button.focus,
.tnt-button:hover,
.tnt-button:active,
.tnt-button.active {
    background-color: #1a2421;
    border-color: #1a2421;
}
.tnt-button:active,
.tnt-button.active,
.open > .dropdown-toggle.tnt-button {
    background-color: #1a2421;
    border-color: #1a2421;
}
.tnt-button:active:hover,
.tnt-button.active:hover,
.open > .dropdown-toggle.tnt-button:hover,
.tnt-button:active:focus,
.tnt-button.active:focus,
.open > .dropdown-toggle.tnt-button:focus,
.tnt-button:active.focus,
.tnt-button.active.focus,
.open > .dropdown-toggle.tnt-button.focus {
    background-color: #1a2421;
    border-color: #1a2421;
}

.tnt-time-button {
    background: #ffffff;
    background-color: #2780e3;
    border-color: #ffffff;
}
.tnt-time-button:focus,
.tnt-time-button.focus,
.tnt-time-button:hover,
.tnt-time-button:active,
.tnt-time-button.active {
    color: #2780e3;
    background-color: #FFFFFF;
    border-color: #FFFFFF;
}
.tnt-time-button:active,
.tnt-time-button.active,
.open > .dropdown-toggle.tnt-time-button {
    color: #2780e3;
    background-color: #FFFFFF;
    border-color: #FFFFFF;
}
.tnt-time-button:active:hover,
.tnt-time-button.active:hover,
.open > .dropdown-toggle.tnt-time-button:hover,
.tnt-time-button:active:focus,
.tnt-time-button.active:focus,
.open > .dropdown-toggle.tnt-time-button:focus,
.tnt-time-button:active.focus,
.tnt-time-button.active.focus,
.open > .dropdown-toggle.tnt-time-button.focus {
    color: #2780e3;
    background-color: #FFFFFF;
    border-color: #FFFFFF;
}

/* Rounded button*/
.tnt-round-button {
    background: #3fb618;
    background-color: #3fb618;
    border-color: #3fb618;
    width: 42px;
    height: 22px;
    border-radius: 34px;
}
.tnt-round-button:focus,
.tnt-round-button.focus,
.tnt-round-button:hover,
.tnt-round-button:active,
.tnt-round-button.active {
    color: #3fb618;
    background-color: #FFFFFF;
    border-color: #3fb618;
}
.tnt-round-button:active,
.tnt-round-button.active,
.open > .dropdown-toggle.tnt-round-button {
    color: #3fb618;
    background-color: #FFFFFF;
    border-color: #3fb618;
}
.tnt-round-button:active:hover,
.tnt-round-button.active:hover,
.open > .dropdown-toggle.tnt-round-button:hover,
.tnt-round-button:active:focus,
.tnt-round-button.active:focus,
.open > .dropdown-toggle.tnt-round-button:focus,
.tnt-round-button:active.focus,
.tnt-round-button.active.focus,
.open > .dropdown-toggle.tnt-round-button.focus {
    color: #3fb618;
    background-color: #FFFFFF;
    border-color: #3fb618;
}

/* Timeline */
.timeline,
.timeline-horizontal {
    list-style: none;
    padding: 20px;
    position: relative;
}
.timeline:before {
    top: 40px;
    bottom: 0;
    position: absolute;
    content: " ";
    width: 3px;
    background-color: #eeeeee;
    margin-left: 0.5px;
}
.timeline .timeline-item {
    /*margin-bottom: 20px;*/
    position: relative;
    width: 100%;
    margin-bottom: -2%;
}
.timeline .timeline-item:before,
.timeline .timeline-item:after {
    content: "";
    display: table;
}
.timeline .timeline-item:after {
    clear: both;
}
.timeline .timeline-item .timeline-badge {
    color: #fff;
    width: 54px;
    height: 54px;
    line-height: 52px;
    font-size: 22px;
    text-align: center;
    position: absolute;
    top: 0px;
    left: 50%;
    margin-left: -25px;
    background-color: #7c7c7c;
    z-index: 100;
}

.timeline .timeline-item .timeline-badge:before {
    bottom: 100%;
    border-bottom: 15px solid #7c7c7c;
}

.timeline .timeline-item .timeline-badge:after {
    top: 100%;
    border-top: 15px solid #7c7c7c;
}

.timeline .timeline-item .timeline-badge i,
.timeline .timeline-item .timeline-badge .fa,
.timeline .timeline-item .timeline-badge .glyphicon {
    top: 2px;
    left: 0px;
}
.timeline .timeline-item .timeline-badge.primary {
    background-color: #2780e3;
}
.timeline .timeline-item .timeline-badge.primary:before {
    border-bottom: 15px solid #2780e3 !important;
}
.timeline .timeline-item .timeline-badge.primary:after {
    border-top: 15px solid #2780e3 !important;
}

.timeline .timeline-item .timeline-badge.info {
    background-color: #5bc0de;
}
.timeline .timeline-item .timeline-badge.info:before {
    border-bottom: 15px solid #5bc0de !important;
}
.timeline .timeline-item .timeline-badge.info:after {
    border-top: 15px solid #5bc0de !important;
}

.timeline .timeline-item .timeline-badge.success {
    background-color: #59ba1f;
}
.timeline .timeline-item .timeline-badge.success:before{
    border-bottom: 15px solid #59ba1f !important;
}
.timeline .timeline-item .timeline-badge.success:after {
    border-top: 15px solid #59ba1f !important;
}

.timeline .timeline-item .timeline-badge.warning {
    background-color: #d1bd10;
}
.timeline .timeline-item .timeline-badge.warning:before{
    border-bottom: 15px solid #d1bd10 !important;
}
.timeline .timeline-item .timeline-badge.warning:after {
    border-top: 15px solid #d1bd10 !important;
}

.timeline .timeline-item .timeline-badge.search {
    background-color: #ba1f1f;
}
.timeline .timeline-item .timeline-badge.search:before {
    border-bottom: 15px solid #ba1f1f !important;
}
.timeline .timeline-item .timeline-badge.search:after {
    border-top: 15px solid #ba1f1f !important;
}


.timeline .timeline-item .timeline-panel {
    position: relative;
    float: left;
    right: 16px;
    background: #ffffff;
    padding: 0px 20px 20px 20px;
}

.timeline .timeline-item .timeline-panel .timeline-title {
    margin-top: 0;
    color: inherit;
}
.timeline .timeline-item .timeline-panel .timeline-body > p,
.timeline .timeline-item .timeline-panel .timeline-body > ul {
    margin-bottom: 0;
}
.timeline .timeline-item .timeline-panel .timeline-body > p + p {
    margin-top: 5px;
}

.timeline .timeline-item .timeline-panel .timeline-body .label-tnt {
    display: inline-block;
    width: 40px;
    text-align: start;
    margin-left: -6px;


}

.timeline .timeline-item .timeline-panel {
    /*float: left;*/
    margin-left: 17%;
    width: 100%;
    background-color: transparent;
}

.timeline-horizontal {
    list-style: none;
    position: relative;
    padding: 20px 0px 30px 0px;
}
.timeline-horizontal:before {
    height: 3px;
    top: auto;
    bottom: 45%;
    right: 0;
    width: 80%;
    left: 10%;
    /* margin-bottom: 20px; */
}
.timeline-horizontal .timeline-item {
    display: table-cell;
    height: 50px;
    width: .20%;
    float: none !important;
    padding-left: 0px;
    padding-right: 0px;
    margin: 0 auto;
    vertical-align: bottom;
}
.timeline-horizontal .timeline-item .timeline-panel {
    top: auto;
    bottom: 64px;
    display: inline-block;
    float: none !important;
    left: 0 !important;
    right: 0 !important;
    width: 100%;
    margin-bottom: 20px;
}
.timeline-horizontal .timeline-item .timeline-panel:before {
    top: auto;
    bottom: -16px;
    left: 28px !important;
    right: auto;
    border-right: 16px solid transparent !important;
    border-top: 16px solid #c0c0c0 !important;
    border-bottom: 0 solid #c0c0c0 !important;
    border-left: 16px solid transparent !important;
}

.timeline-horizontal .timeline-item:after {
    display: none;
}
.timeline-horizontal .timeline-item .timeline-badge {
    top: auto;
    bottom: 7px;
    border-style: none;
    width: 54px;
}

.timeline-vertical .timeline-item .timeline-badge {
    left: 0;
}
.selector:not(*:root), .timeline-vertical .timeline-item .timeline-badge {
    left: -3.0px;
}

.timeline-legends {
    /*float: left;*/
    margin-left: 20%;
    width: 100%;
    background-color: transparent;
}

.label-success {
    background-color: #59ba1f;
    color: #ffffff;
}

.label-failure {
    background-color: #ff0039;
    color: #ffffff;
}
.label-awaiting {
    background-color: #2780e3;
    color: #ffffff;
}

/*DELIVERED SUMMARY PANEL*/
.delivered {
    background-color: #3fb618;
    color: #ffffff;
}

/*SWITCH*/
/* The switch - the box around the slider */
.switch {
    position: relative;
    display: inline-block;
    width: 45px;
    height: 25.5px;
    margin-bottom: 0px;
}

/* Hide default HTML checkbox */
.switch input {display:none;}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 19.5px;
    width: 19.5px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked + .slider {
    background-color: #3fb618;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    -webkit-transform: translateX(19.5px);
    -ms-transform: translateX(19.5px);
    transform: translateX(19.5px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.parent{
    display:table;
    margin-left: -23%;
    padding-top: 3%;

}
.child{
    display:table-cell;
    vertical-align:middle;
    padding-left:20px;

}

.tnt-checkbox {
    height: 15px;
    width: 15px;
    vertical-align: middle;
    margin: 0 0.4em 0.4em 0;
    border: 1px solid #3fb618;

    -webkit-appearance: none;
    -webkit-transition: box-shadow 200ms;

}

/* hover state */
.tnt-checkbox:not(:disabled):hover {
    border-color:#2196F3;    
}

/* active state */
.tnt-checkbox:active:not(:disabled) {
    border-color:#3fb618;
}

/* focus state */
.tnt-checkbox:focus {
    outline:none;
    border-color:#3fb618;
}

/* input checked border color */
.tnt-checkbox:checked {
    border-color:#3fb618;
}

/* checkbox checked */
.tnt-checkbox:checked:before {
    content: '';
    display: block;
    width: 8px;
    height: 13px;
    border: solid #3fb618;
    border-width: 0 2px 2px 0;
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
    margin-left: 3px;
    margin-top: 0px;
}

/* disabled input */
input:disabled {
    /*opacity: .6;*/
    box-shadow: none;
    background: rgba(0, 0, 0, 0.1);
    box-shadow:none;
    background-color: #e6e6e6;
    opacity: 1;
    border: 1px solid #cccccc;
}

/* style label for disabled input */
input:disabled + label {
    opacity: .6;
    cursor:default;
    -webkit-user-select: none;
}


/* chevrons for panels */
.panel-heading .panel-toggle:after {
    font-family: 'FontAwesome';
    content: "\f078";
    float: left;
    color: grey;
}
.panel-heading .panel-toggle.collapsed:after {
    content: "\f054";
}

.panel-toggle {
	margin-left: 7.5px;
}

/* incomplete milestone div */
.incomplete-milestone {
	margin-left: 20%;
	margin-top: 20px;
}

/* floating button for back to search results*/
.floating-back-button {
    position: fixed;
    bottom: 2em;
    right: 0px;
    text-decoration: none;
    background-color: rgba(222, 0, 41, 0.80);
    color: #ffffff;
    font-size: 12px;
    padding: 1em;
    display: none;
    z-index: 110;
}

html.embedded .container {
    width: auto;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
}
html.embedded .container > .row {
    margin-left: 0;
    margin-right: 0;
}
html.embedded.full {
    background: transparent;
}
html.embedded body {
    margin: 0;
}
/* the leading <br/><br/> spacing is not needed inside the host page */
html.embedded body > br {
    display: none;
}


/* =====================================================================================
   SACC_TNT - Saudia Cargo look, from SACC-Design/Khymo v7 - Saudia Green.
   Everything is scoped to html.sacc (set in index.html when APP_NAME == 'SACC_TNT').
   Token values come from the Saudia Cargo design system (SACC-Design/_ds/.../tokens).
   They are written in px, not rem: bootstrap re-bases html to 10px, so the design
   system rem values would come out too small here.
   ===================================================================================== */
html.sacc {
    --color-primary: #0F2B51;
    --color-primary-90: rgba(15, 43, 81, 0.9);
    --color-primary-25: rgba(15, 43, 81, 0.25);
    --color-primary-10: rgba(15, 43, 81, 0.1);
    --color-secondary: #A6D8F4;
    --color-secondary-40: rgba(166, 216, 244, 0.4);
    --color-secondary-20: rgba(166, 216, 244, 0.2);
    --color-accent-green: #006839;
    --color-accent-green-dark: #00542D;
    --color-accent-green-75: rgba(0, 104, 57, 0.75);
    --surface-page: #F7FCFF;
    --surface-card: #FFFFFF;
    --border-field: var(--color-secondary-40);
    --text-body: var(--color-primary);
    --text-on-dark: #FFFFFF;
    --text-on-dark-muted: rgba(255, 255, 255, 0.8);
    --font-family-base: "saudiaSans", "Poppins", "Segoe UI", -apple-system, sans-serif;
    --radius-sm: 4.5px;
    --radius-md: 8px;
    --shadow-card: 0 4px 12px rgba(15, 43, 81, 0.12);
    --shadow-card-hover: 0 8px 20px rgba(15, 43, 81, 0.2);
    --focus-ring: 0 0 0 3px var(--color-secondary-20);
}
html.sacc.full:not(.embedded) {
    background: var(--surface-page);
}
html.sacc body {
    margin: 0;
    font-family: var(--font-family-base);
    color: var(--text-body);
}

/* ---- search band ----
   No photo and no heading: the host page (saudiacargo.com) supplies those, and the band sits
   on whatever is behind the iframe, so everything here is navy-on-light. Embedded, the band is
   flush with the iframe edge so it lines up with the host text; standalone it gets a gutter. */
html.sacc .sacc-band {
    color: var(--text-body);
}
html.sacc .sacc-band__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
html.sacc:not(.embedded) .sacc-band__inner {
    padding: 24px 16px;
}
/* heading, left out by the template when the request has embed=1 */
html.sacc .sacc-band__eyebrow {
    font-size: 16.8px;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--color-accent-green);
}
html.sacc .sacc-band__title {
    margin: 0 0 4px;
    font-family: inherit;
    font-size: clamp(28px, 3.2vw, 49px);
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-primary);
}
html.sacc .sacc-search {
    padding: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
}
html.sacc .sacc-search__field {
    min-width: 0;
}

/* the AWB field is a bootstrap-tagsinput box, so style the wrapper it generates */
html.sacc .sacc-search .bootstrap-tagsinput {
    width: 100%;
    min-height: 40px;
    margin: 0;
    padding: 6px 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-body);
    background: var(--surface-card);
    border: 1px solid var(--border-field);
    border-radius: var(--radius-md);
    box-shadow: none;
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}
html.sacc .sacc-search .bootstrap-tagsinput:focus-within {
    border-color: var(--color-primary);
    box-shadow: var(--focus-ring);
}
html.sacc .sacc-search .bootstrap-tagsinput input {
    flex: 1 1 200px;
    min-width: 0;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-body);
}
html.sacc .sacc-search .bootstrap-tagsinput input::placeholder {
    color: var(--color-primary-90);
    opacity: 0.75;
}
html.sacc .sacc-search .bootstrap-tagsinput .tag {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--radius-sm);
}
html.sacc .sacc-search .bootstrap-tagsinput .tag.label-primary {
    background: var(--color-accent-green);
}

/* ---- buttons ---- */
html.sacc .sacc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-weight: 500;
    line-height: 1.5;
    white-space: nowrap;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
html.sacc .sacc-btn:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}
html.sacc .sacc-btn--primary {
    min-height: 40px;
    padding: 8px 24px;
    font-size: 14px;
    color: var(--text-on-dark);
    background: var(--color-accent-green);
    border: 2px solid transparent;
}
html.sacc .sacc-btn--primary:hover {
    background: var(--color-accent-green-dark);
}
html.sacc .sacc-btn__icon {
    flex: none;
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
html.sacc .sacc-btn--ghost {
    padding: 2px 12px;
    font-size: 12px;
    color: var(--color-primary);
    background: var(--surface-card);
    border: 1px solid var(--color-primary-25);
}
html.sacc .sacc-btn--ghost:hover {
    background: #EFF1F4;
}
html.sacc .sacc-btn--outline {
    align-self: flex-start;
    margin: 0;
    padding: 8px 16px;
    font-size: 14px;
    color: var(--color-accent-green);
    background: var(--surface-card);
    border: 2px solid var(--color-accent-green-75);
}
html.sacc .sacc-btn--outline:hover {
    color: var(--text-on-dark);
    background: var(--color-accent-green-75);
}

/* ---- hint, Clear, Local/UTC ---- */
html.sacc .sacc-search__meta {
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
}
html.sacc .sacc-search__hint {
    font-size: 12px;
    color: var(--color-primary-90);
}
html.sacc .sacc-search__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
html.sacc .sacc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 2px 2px 8px;
    font-size: 12px;
    color: var(--color-primary);
    background: var(--surface-card);
    border: 1px solid var(--color-primary-25);
    border-radius: var(--radius-sm);
}
html.sacc .sacc-toggle .fa {
    margin-inline-end: 4px;
}
html.sacc .sacc-toggle__btn {
    padding: 1px 10px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-primary);
    background: transparent;
    border: 0;
    border-radius: 3px;
    cursor: pointer;
    transition: background 150ms ease, color 150ms ease;
}
html.sacc .sacc-toggle__btn:hover {
    background: #EFF1F4;
}
html.sacc .sacc-toggle__btn.active {
    color: var(--text-on-dark);
    background: var(--color-primary);
}
html.sacc .sacc-search__error {
    margin: 0;
    padding: 8px 12px;
    font-size: 12px;
    color: var(--color-primary);
    background: rgba(255, 255, 255, 0.9);
    border-inline-start: 3px solid #C62828;
    border-radius: var(--radius-sm);
}

/* ---- standalone band (no ?embed=1): the design's photo with light text over it ---- */
html.sacc .sacc-band.sacc-band-photo {
    color: var(--text-on-dark);
    background: url("../images/header-bg.webp") center right / cover no-repeat;
}
html.sacc .sacc-band.sacc-band-photo .sacc-band__inner {
    padding: 24px 16px;
}
html.sacc .sacc-band-photo .sacc-band__eyebrow {
    color: var(--color-secondary);
    text-shadow: 0 1px 3px rgba(15, 43, 81, 0.85), 0 0 12px rgba(15, 43, 81, 0.6);
}
html.sacc .sacc-band-photo .sacc-band__title {
    color: var(--text-on-dark);
    text-shadow: 0 1px 3px rgba(15, 43, 81, 0.85), 0 0 16px rgba(15, 43, 81, 0.55);
}
html.sacc .sacc-band-photo .sacc-search .bootstrap-tagsinput {
    background: rgba(255, 255, 255, 0.75);
}
html.sacc .sacc-band-photo .sacc-search .bootstrap-tagsinput:focus-within {
    background: rgba(255, 255, 255, 0.9);
}
html.sacc .sacc-band-photo .sacc-search__hint {
    color: var(--text-on-dark-muted);
    text-shadow: 0 1px 3px rgba(15, 43, 81, 0.85), 0 0 12px rgba(15, 43, 81, 0.6);
}
html.sacc .sacc-band-photo .sacc-btn--ghost,
html.sacc .sacc-band-photo .sacc-toggle {
    color: var(--text-on-dark);
    background: rgba(15, 43, 81, 0.35);
    border-color: rgba(255, 255, 255, 0.6);
}
html.sacc .sacc-band-photo .sacc-btn--ghost:hover {
    background: rgba(15, 43, 81, 0.6);
}
html.sacc .sacc-band-photo .sacc-toggle__btn {
    color: var(--text-on-dark);
}
html.sacc .sacc-band-photo .sacc-toggle__btn:hover {
    background: rgba(255, 255, 255, 0.15);
}
html.sacc .sacc-band-photo .sacc-toggle__btn.active {
    color: var(--color-primary);
    background: var(--surface-card);
}
html.sacc .sacc-band-photo .sacc-btn--outline {
    background: rgba(255, 255, 255, 0.85);
}

/* PHONE: field and button stack, controls reach 44px */
@media (max-width: 560px) {
    html.sacc .sacc-search {
        grid-template-columns: minmax(0, 1fr);
    }
    html.sacc .sacc-btn--primary,
    html.sacc .sacc-search .bootstrap-tagsinput {
        width: 100%;
        min-height: 44px;
    }
}

/* =====================================================================================
   SACC_TNT results cards (results-fragment.html, SACC branch; js/sacc-results.js).
   Shipment + Flights on the first row, Tracking details + Route map on the second, one
   column below 860px. Values from the design's inline styles, in px.
   ===================================================================================== */
html.sacc #search-results-holder {
    padding-top: 8px;
}
html.sacc .sacc-results {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
html.sacc:not(.embedded) .sacc-results {
    padding: 0 16px 24px;
}
html.sacc .sacc-results p {
    margin: 0;
}
html.sacc .sacc-card {
    background: var(--surface-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}
html.sacc .sacc-badge {
    display: inline-block;
    padding: 1px 3px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.02em;
    white-space: nowrap;
    color: var(--color-primary-90);
    border: 1px solid var(--color-primary-90);
    border-radius: var(--radius-sm);
}
html.sacc .sacc-parcel {
    flex: none;
    display: block;
    width: 16px;
    height: 16px;
    fill: var(--color-primary);
}
html.sacc .sacc-route-plane {
    flex: none;
    width: 20px;
    height: 20px;
    align-self: center;
    fill: rgba(255, 255, 255, 0.55);
}
html.sacc .sacc-empty {
    font-size: 12px;
    color: var(--color-primary-90);
}

/* ---- loading card (index.html #search-spinner) ---- */
html.sacc .sacc-loading {
    max-width: 1200px;
    margin: 8px auto 0;
    padding: 0 0 16px;
}
html.sacc:not(.embedded) .sacc-loading {
    padding: 0 16px 24px;
}
html.sacc .sacc-loading-card {
    padding: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
html.sacc .sacc-loading-ring {
    width: 32px;
    height: 32px;
    border: 3px solid var(--color-secondary-40);
    border-top-color: var(--color-accent-green);
    border-radius: 9999px;
    animation: sacc-spin 800ms linear infinite;
}
html.sacc .sacc-loading-text {
    font-size: 12px;
    color: var(--color-primary-90);
}
@keyframes sacc-spin {
    to {
        transform: rotate(360deg);
    }
}
/* the card replaces the result area while a search runs */
html.sacc #search-spinner:not([style*="none"]) + #search-results-holder {
    display: none;
}

/* ---- soft appearance: results, the multi-AWB list and the loading card fade in over 180ms
   whenever they appear (after Search, View details, Back to search results). jQuery's
   show() takes them out of display:none, which restarts the animation each time. ---- */
@keyframes sacc-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
html.sacc .sacc-loading,
html.sacc .sacc-notfound,
html.sacc .sacc-picklist,
html.sacc .sacc-result {
    animation: sacc-fade-in 180ms ease both;
}
@media (prefers-reduced-motion: reduce) {
    html.sacc .sacc-loading,
    html.sacc .sacc-notfound,
    html.sacc .sacc-picklist,
    html.sacc .sacc-result {
        animation: none;
    }
}

/* ---- not found ---- */
html.sacc .sacc-notfound {
    padding: 32px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
html.sacc .sacc-notfound-icon {
    flex: none;
    width: 24px;
    height: 24px;
    margin-top: 2px;
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}
html.sacc .sacc-notfound-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
html.sacc .sacc-notfound-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-primary);
}
html.sacc .sacc-notfound-body {
    max-width: 60ch;
    font-size: 14px;
    line-height: 1.5;
}
html.sacc .sacc-notfound-awbs {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--color-primary-90);
}

/* ---- several AWBs: one Shipment-style card each (green Air waybill zone + status),
   two per row like the result cards; the whole card opens the result ---- */
html.sacc .sacc-picklist {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
@media (max-width: 860px) {
    html.sacc .sacc-picklist {
        grid-template-columns: minmax(0, 1fr);
    }
}
html.sacc .sacc-pick {
    cursor: pointer;
    transition: box-shadow 150ms ease;
}
html.sacc .sacc-pick:hover {
    box-shadow: var(--shadow-card-hover);
}
html.sacc .sacc-pick:focus-visible {
    outline: none;
    box-shadow: var(--shadow-card-hover), var(--focus-ring);
}
/* the "View details" label looks like the card's outline button and fills on card hover */
html.sacc .sacc-pick-open {
    pointer-events: none;
}
html.sacc .sacc-pick:hover .sacc-pick-open,
html.sacc .sacc-pick:focus-visible .sacc-pick-open {
    color: var(--text-on-dark);
    background: var(--color-accent-green-75);
}

/* ---- one shipment: two rows of cards ---- */
html.sacc .sacc-result {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
html.sacc .sacc-cols,
html.sacc .sacc-cols2 {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 16px;
}
html.sacc .sacc-cols2 {
    --panel-h: 312px;
    align-items: start;
}
@media (max-width: 860px) {
    html.sacc .sacc-cols,
    html.sacc .sacc-cols2 {
        grid-template-columns: minmax(0, 1fr);
    }
    /* stacked, the route map reads before the milestone log */
    html.sacc .sacc-map {
        order: -1;
    }
}

/* ---- shipment card ---- */
html.sacc .sacc-status {
    container-type: inline-size;
    position: relative;
}
/* the photo sits on its own layer so it can be desaturated without greying the text */
html.sacc .sacc-status::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../images/shipment-bg.webp") center / cover no-repeat;
    filter: grayscale(0.6);
}
html.sacc .sacc-status-inner {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: row-reverse;
    align-items: stretch;
}
html.sacc .sacc-status-main {
    flex: 1 1 auto;
    min-width: 0;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: rgba(255, 255, 255, 0.85);
}
html.sacc .sacc-status-msg {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: clamp(20px, 1.6vw, 24px);
    font-weight: 500;
    line-height: 1.35;
    color: var(--color-accent-green);
}
html.sacc .sacc-status-icon {
    flex: none;
}
html.sacc .sacc-status-icon svg {
    display: block;
    width: 24px;
    height: 24px;
    margin-top: 0.15em;
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 1.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
html.sacc .sacc-status-icon .sacc-status-dep {
    width: 26px;
}
html.sacc .sacc-status-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: 12px;
    color: var(--color-primary-90);
}
html.sacc .sacc-status-station {
    font-weight: 600;
}
html.sacc .sacc-status-badges {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
html.sacc .sacc-notify-btn {
    margin-top: auto;
    align-self: flex-end;
    background: transparent;
}
/* special handling codes on the left, Notify Me kept at the end */
html.sacc .sacc-status-foot {
    margin-top: auto;
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}
html.sacc .sacc-status-foot .sacc-notify-btn {
    flex: none;
    margin-inline-start: auto;
}
html.sacc .sacc-shc {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-end;
    gap: 4px;
}
html.sacc .sacc-shc-code {
    padding: 2px 7px;
    font-size: 12px;
    line-height: 1;
    letter-spacing: 0.02em;
    white-space: nowrap;
    color: var(--color-primary);
    border: 1px solid var(--color-primary-25);
    border-radius: 999px;
    cursor: default;
}
html.sacc .sacc-status-facts {
    flex: 0 0 auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    text-align: right;
    color: var(--text-on-dark);
    /* accent green over accent green dark, both at 70% over the photo */
    background-image: linear-gradient(180deg, rgba(0, 104, 57, 0.7), rgba(0, 84, 45, 0.7));
}
html.sacc .sacc-fact {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
html.sacc .sacc-fact-label {
    font-size: 12px;
    color: var(--text-on-dark-muted);
}
html.sacc .sacc-fact-awb,
html.sacc .sacc-fact-value {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}
html.sacc .sacc-fact-sep {
    color: var(--text-on-dark-muted);
}
html.sacc .sacc-fact-route {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.02em;
}
html.sacc .sacc-fact-pair {
    display: flex;
    gap: 24px;
}
/* the card stacks on its own width, not the viewport's */
@container (max-width: 400px) {
    html.sacc .sacc-status-inner {
        flex-direction: column-reverse;
    }
}

/* ---- flights card ---- */
html.sacc .sacc-flights-body {
    height: 100%;
    padding: 16px;
    display: flex;
    flex-direction: column;
}
html.sacc .sacc-legs {
    display: grid;
    grid-template-columns: minmax(0, auto) minmax(56px, 1fr) minmax(0, auto);
    column-gap: 12px;
}
html.sacc .sacc-leg-th {
    display: flex;
    align-items: flex-end;
    padding: 0 0 4px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--color-primary-90);
}
html.sacc .sacc-leg-rule {
    grid-column: 1 / -1;
    height: 1px;
    background: var(--color-primary-25);
}
html.sacc .sacc-leg-row {
    display: contents;
}
html.sacc .sacc-leg-cell {
    padding: 8px 0 0;
    display: flex;
    align-items: center;
}
/* the first leg sits under a rule; match the gap the later legs get from half-leading */
html.sacc .sacc-leg-rule + .sacc-leg-row > .sacc-leg-cell {
    padding-top: 11px;
}
html.sacc .sacc-leg-end {
    display: flex;
    flex-direction: column;
    font-size: 14px;
}
html.sacc .sacc-leg-dep {
    align-items: stretch;
    text-align: right;
}
html.sacc .sacc-leg-place {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    white-space: nowrap;
}
html.sacc .sacc-leg-dep .sacc-leg-place {
    justify-content: flex-end;
}
html.sacc .sacc-leg-date {
    font-size: 12px;
    white-space: nowrap;
    color: var(--color-primary-90);
}
html.sacc .sacc-leg-conn {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px auto minmax(0, 1fr);
    column-gap: 4px;
    align-items: center;
}
html.sacc .sacc-leg-flight,
html.sacc .sacc-leg-pcs {
    grid-column: 2;
    justify-self: end;
    line-height: 1;
    white-space: nowrap;
}
html.sacc .sacc-leg-flight {
    grid-row: 1;
    align-self: end;
    margin-bottom: -8px;
    font-size: 14px;
    font-weight: 500;
}
html.sacc .sacc-leg-pcs {
    grid-row: 3;
    align-self: start;
    margin-top: -8px;
    font-size: 12px;
    color: var(--color-primary-90);
}
/* only the leg carrying the parcel holds its labels clear of it */
html.sacc .sacc-leg-conn.is-here .sacc-leg-flight,
html.sacc .sacc-leg-conn.is-here .sacc-leg-pcs {
    padding-inline-end: 26px;
}
html.sacc .sacc-leg-line {
    height: 21px;
    display: flex;
    align-items: center;
    gap: 4px;
}
html.sacc .sacc-leg-line-out {
    grid-row: 2;
    grid-column: 1 / span 2;
}
html.sacc .sacc-leg-line-in {
    grid-row: 2;
    grid-column: 4;
}
html.sacc .sacc-leg-stop {
    flex: none;
    width: 7px;
    height: 7px;
    border-radius: 9999px;
    background: var(--color-primary-25);
}
html.sacc .sacc-leg-dots {
    flex: 1;
    border-top: 2px dotted var(--color-primary-25);
}
html.sacc .sacc-leg-craft,
html.sacc .sacc-leg-truck {
    grid-row: 2;
    grid-column: 3;
    display: grid;
    place-items: center;
    color: var(--color-accent-green);
}
html.sacc .sacc-leg-craft {
    transform: rotate(90deg);
}
html.sacc .sacc-leg-craft svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}
html.sacc .sacc-leg-truck .fa {
    font-size: 18px;
}
html.sacc .sacc-flights-key {
    margin-top: auto;
    padding-top: 24px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--color-primary);
}

/* ---- tracking details card ---- */
html.sacc .sacc-ms {
    display: flex;
    flex-direction: column;
}
html.sacc .sacc-ms-header {
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}
html.sacc .sacc-ms-title {
    margin: 0;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--color-primary);
}
html.sacc .sacc-ms-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-inline-start: -12px;
}
/* Legend chips: darker grey fill when the state is shown, white with a darker grey outline
   when it is hidden. "Your shipment" is fixed on, so it is a plain label. */
html.sacc .sacc-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 12px 2px 8px;
    font-family: inherit;
    font-size: 12px;
    color: var(--color-primary-90);
    background: var(--surface-card);
    border: 1px solid #98A2B3;
    border-radius: 9999px;
    cursor: pointer;
    transition: background 150ms ease, border-color 150ms ease;
}
html.sacc .sacc-chip:hover {
    background: #EFF1F4;
}
html.sacc .sacc-chip.is-on {
    color: var(--color-primary);
    background: #CDD2DA;
    border-color: #CDD2DA;
}
html.sacc .sacc-chip.is-on:hover {
    background: #C0C6D0;
    border-color: #C0C6D0;
}
/* the grey "not reported" dot needs a ring to show on the grey chip */
html.sacc .sacc-chip.is-on .sacc-chip-dot[data-kind="missed"] {
    box-shadow: 0 0 0 1.5px var(--surface-card);
}
html.sacc .sacc-chip-fixed,
html.sacc .sacc-chip-fixed:hover {
    color: var(--color-primary);
    background: transparent;
    border-color: transparent;
    cursor: default;
}
html.sacc .sacc-chip-dot {
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 9999px;
}
html.sacc .sacc-chip-dot[data-kind="current"] {
    width: 20px;
    height: 20px;
    border-radius: 0;
}

/* The four milestone states. Dots: current = parcel glyph, completed = solid navy,
   planned = hollow sky ring, missed (passed without being reported) = grey. */
html.sacc .sacc-chip-dot[data-kind="current"],
html.sacc .sacc-ms-row[data-kind="current"] .sacc-ms-dot {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='%230F2B51'%3E%3Cpath d='M12 3.25 19.47 7.4 12 11.55 4.53 7.4z'/%3E%3Cpath d='M3.77 8.6 11.24 12.75v7.47L3.77 16.23z'/%3E%3Cpath d='M20.23 8.6v7.63l-7.47 3.99v-7.47z'/%3E%3C/g%3E%3C/svg%3E") center / 20px 20px no-repeat;
}
html.sacc .sacc-chip-dot[data-kind="completed"],
html.sacc .sacc-ms-row[data-kind="completed"] .sacc-ms-dot {
    background: var(--color-primary);
}
html.sacc .sacc-chip-dot[data-kind="planned"],
html.sacc .sacc-ms-row[data-kind="planned"] .sacc-ms-dot {
    background: var(--surface-card);
    box-shadow: inset 0 0 0 2px var(--color-secondary);
}
html.sacc .sacc-chip-dot[data-kind="missed"],
html.sacc .sacc-ms-row[data-kind="missed"] .sacc-ms-dot {
    background-color: var(--surface-card);
    background-image: linear-gradient(var(--color-primary-25), var(--color-primary-25));
}

html.sacc .sacc-ms-scroll {
    padding: 0 16px 16px;
    display: flex;
    flex-direction: column;
}
/* above the card breakpoint the list scrolls inside the map card's height; the scrollbar
   track is always 8px and only the thumb fades in, so the content never changes width */
@media (min-width: 861px) {
    html.sacc .sacc-ms {
        height: var(--panel-h);
    }
    html.sacc .sacc-ms-scroll {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: transparent transparent;
    }
    html.sacc .sacc-ms-scroll:hover {
        scrollbar-color: var(--color-primary-25) transparent;
    }
    html.sacc .sacc-ms-scroll::-webkit-scrollbar {
        width: 8px;
    }
    html.sacc .sacc-ms-scroll::-webkit-scrollbar-thumb {
        background: transparent;
        border-radius: 9999px;
    }
    html.sacc .sacc-ms-scroll:hover::-webkit-scrollbar-thumb {
        background: var(--color-primary-25);
    }
}
html.sacc .sacc-ms-station,
html.sacc .sacc-ms-rows {
    display: flex;
    flex-direction: column;
}
html.sacc .sacc-ms-station.is-hidden,
html.sacc .sacc-ms-row.is-hidden {
    display: none;
}
html.sacc .sacc-ms-head,
html.sacc .sacc-ms-row {
    display: grid;
    grid-template-columns: 80px 2px 32px minmax(0, 1fr);
    column-gap: 16px;
}
html.sacc .sacc-ms-row {
    align-items: baseline;
}
html.sacc .sacc-ms-row[data-kind="current"] {
    background: var(--color-secondary-20);
    border-radius: var(--radius-sm);
}
/* the rail is painted, not a border, so the cell can always stretch under its dot */
html.sacc .sacc-ms-rail {
    position: relative;
    align-self: stretch;
    background-image: linear-gradient(var(--color-secondary-40), var(--color-secondary-40));
    background-repeat: no-repeat;
    background-size: 2px 100%;
    background-position: 0 0;
}
html.sacc .sacc-ms-head-rail {
    grid-area: 1 / 2;
}
html.sacc .sacc-ms-station.is-first .sacc-ms-head-rail {
    background-image: none;
}
html.sacc .sacc-ms-row.is-first .sacc-ms-rail {
    background-position: 0 18.5px;
}
html.sacc .sacc-ms-row.is-last .sacc-ms-rail {
    background-size: 2px 18.5px;
}
html.sacc .sacc-ms-row.is-first.is-last .sacc-ms-rail {
    background-image: none;
}
html.sacc .sacc-ms-head-text {
    grid-area: 1 / 2;
    justify-self: center;
    position: relative;
    padding: 16px 8px 12px;
    white-space: nowrap;
    font-size: 12px;
    color: var(--color-primary-90);
    background: var(--surface-card);
}
html.sacc .sacc-ms-head-code {
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--color-primary);
}
html.sacc .sacc-ms-warehouse {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-inline-start: 8px;
    vertical-align: -0.18em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
/* row spacing lives on the cells: padding on the row would break the rail into dashes */
html.sacc .sacc-ms-time,
html.sacc .sacc-ms-code,
html.sacc .sacc-ms-msg {
    padding: 8px 0;
    font-size: 12px;
    color: var(--color-primary);
}
html.sacc .sacc-ms-time {
    white-space: nowrap;
    text-align: end;
    color: var(--color-primary-90);
}
html.sacc .sacc-ms-code {
    letter-spacing: 0.02em;
}
html.sacc .sacc-ms-msg {
    min-width: 0;
}
html.sacc .sacc-ms-row[data-kind="current"] .sacc-ms-code,
html.sacc .sacc-ms-row[data-kind="current"] .sacc-ms-msg,
html.sacc .sacc-ms-row[data-kind="completed"] .sacc-ms-code,
html.sacc .sacc-ms-row[data-kind="completed"] .sacc-ms-msg {
    font-weight: 600;
}
/* deliberately low contrast: a milestone that should have been reported and wasn't must not
   read like a reported one */
html.sacc .sacc-ms-row[data-kind="missed"] .sacc-ms-time,
html.sacc .sacc-ms-row[data-kind="missed"] .sacc-ms-code,
html.sacc .sacc-ms-row[data-kind="missed"] .sacc-ms-msg {
    color: #B4BBC7;
}
/* dot centre on the first text line: 8px cell padding + half the 21px line box - half the dot */
html.sacc .sacc-ms-dot {
    position: absolute;
    left: -4px;
    top: 13.5px;
    width: 10px;
    height: 10px;
    border-radius: 9999px;
}
html.sacc .sacc-ms-row[data-kind="current"] .sacc-ms-dot {
    z-index: 1;
    left: -9px;
    top: 8.5px;
    width: 20px;
    height: 20px;
    border-radius: 0;
}
html.sacc .sacc-ms[data-hide-completed="true"] .sacc-ms-row[data-kind="completed"],
html.sacc .sacc-ms[data-hide-planned="true"] .sacc-ms-row[data-kind="planned"],
html.sacc .sacc-ms[data-hide-missed="true"] .sacc-ms-row[data-kind="missed"] {
    display: none;
}

/* ---- route map card ---- */
html.sacc .sacc-map-box {
    height: var(--panel-h);
    padding: 16px;
}
/*
 * <i2-route-map>, styled as the previous <cargo-map> card. The widget draws in a shadow
 * root: custom properties cross it, and ::part() reaches the pieces it exposes.
 * Colours come from the html.sacc design tokens above; the map-only values are named once here.
 */
html.sacc .sacc-cargo-map {
    /* map-only colours (not in the design tokens) */
    --sacc-map-land: #D9ECF9;
    --sacc-map-chrome-border: rgba(166, 216, 244, 0.6);

    display: block;
    width: 100%;
    height: 100%;
    min-height: 200px;
    border-radius: var(--radius-md);
    overflow: hidden;

    --i2-font: var(--font-family-base);
    --i2-text: var(--color-primary);
    --i2-surface: var(--surface-card);
    --i2-radius: var(--radius-sm);
    --i2-shadow: var(--shadow-card);
    --i2-border: var(--sacc-map-chrome-border);

    --i2-route-map-brand: var(--color-accent-green);
    --i2-route-map-ocean: var(--surface-page);
    --i2-route-map-land: var(--sacc-map-land);
    --i2-route-map-border: var(--sacc-map-land);
    --i2-route-map-country-border: var(--surface-card);

    /* flown and planned legs are both green; planned is dashed */
    --i2-route-map-leg-width: 2px;
    --i2-route-map-leg-dash: 5 5;
    --i2-route-map-leg-planned: var(--color-accent-green);
    --i2-route-map-plane-planned: var(--color-accent-green);
    --i2-route-map-plane-halo: var(--surface-page);
    --i2-route-map-plane-halo-width: 1.6px;

    /* geometry is set through tokens (written as SVG attributes), not CSS r / rx,
       which older Safari ignores */
    --i2-route-map-airport-radius: 4.5px;
    --i2-route-map-flight-chip-radius: var(--radius-sm);

    --i2-route-map-airport-label: var(--color-primary);
    --i2-route-map-label-size: 11px;
    --i2-route-map-current: var(--color-primary);
}

/* stations: reached are solid green, still to come are hollow with a green ring */
html.sacc .sacc-cargo-map::part(airport) {
    fill: var(--color-accent-green);
    stroke: var(--surface-card);
    stroke-width: 2px;
}
html.sacc .sacc-cargo-map::part(airport planned) {
    fill: var(--surface-card);
    stroke: var(--color-accent-green);
}
html.sacc .sacc-cargo-map::part(airport-ring),
html.sacc .sacc-cargo-map::part(current-ring) {
    display: none;
}

/* station codes and the parcel sit straight on the map, with no plate behind them */
html.sacc .sacc-cargo-map::part(airport-label) {
    font-weight: 500;
    stroke: none;
}
html.sacc .sacc-cargo-map::part(parcel) {
    stroke: none;
}

/* flight numbers on chips: filled green once flown, white with a sky border while planned */
html.sacc .sacc-cargo-map::part(flight-label) {
    font-size: 10px;
    font-weight: 600;
    fill: var(--color-primary);
    stroke: none;
}
html.sacc .sacc-cargo-map::part(flight-label flown) {
    fill: var(--text-on-dark);
}
html.sacc .sacc-cargo-map::part(flight-chip) {
    fill: var(--surface-card);
    stroke: var(--color-secondary);
    stroke-width: 1px;
}
html.sacc .sacc-cargo-map::part(flight-chip flown) {
    fill: var(--color-accent-green);
    stroke: var(--color-accent-green);
}

/* zoom / fit buttons, bottom-right */
html.sacc .sacc-cargo-map::part(controls) {
    inset-block-end: 12px;
    inset-inline-end: 12px;
    gap: 6px;
}
html.sacc .sacc-cargo-map::part(button) {
    font: 500 15px/1 var(--i2-font);
}
html.sacc .sacc-cargo-map::part(fit) {
    margin-block-start: 0;
}
html.sacc .sacc-cargo-map::part(button-icon) {
    width: 15px;
    height: 15px;
    stroke-width: 2;
}

/* legend, bottom-left: the design's legend (SACC-Design cargo-map), value for value */
html.sacc .sacc-cargo-map::part(legend) {
    inset-block-end: 12px;
    inset-inline-start: 12px;
    gap: 5px;
    padding: 8px 10px;
    border: 0;
    border-radius: var(--radius-sm);
    background: var(--surface-card);
    box-shadow: var(--shadow-card);
    color: var(--color-primary);
    font: 400 11px/1.4 var(--i2-font);
}
html.sacc .sacc-cargo-map::part(legend-row) {
    gap: 6px;
}
html.sacc .sacc-cargo-map::part(legend-row current) {
    gap: 4px;
}
/* Flown and Planned keys are 18px rules, 2px thick, as in the design (solid, and a dashed
   border). The swatch box itself draws the rule; its inner line is clipped away. */
html.sacc .sacc-cargo-map::part(legend-swatch flown),
html.sacc .sacc-cargo-map::part(legend-swatch planned) {
    width: 18px;
    height: 0;
    overflow: hidden;
    border-top: 2px solid var(--color-accent-green);
}
html.sacc .sacc-cargo-map::part(legend-swatch planned) {
    border-top-style: dashed;
}
html.sacc .sacc-cargo-map::part(legend-swatch current) {
    width: 16px;
    height: 16px;
}

/* the Ctrl + scroll hint as a small navy pill along the top (where the touch hint sits), not a full overlay */
html.sacc .sacc-cargo-map::part(hint) {
    inset: 8px auto auto 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    background: var(--color-primary-90);
    font: 400 11px/1.3 var(--i2-font);
    white-space: nowrap;
}

/* ---- notify me dialog ---- */
html.sacc .sacc-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    place-items: center;
    padding: 16px;
    background: rgba(15, 43, 81, 0.25);
}
html.sacc .sacc-modal.is-open {
    display: grid;
}
/* in an iframe the viewport is the whole page, so open the dialog over the result instead */
html.sacc.embedded .sacc-modal {
    position: absolute;
    align-items: start;
    border-radius: var(--radius-md);
}
html.sacc .sacc-dialog {
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    color: var(--color-primary);
    background: var(--surface-card);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(15, 43, 81, 0.25);
}
html.sacc .sacc-dialog-title {
    font-size: 20px;
    font-weight: 500;
}
html.sacc .sacc-dialog-text {
    font-size: 14px;
    line-height: 1.5;
}
html.sacc .sacc-dialog .notification {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
html.sacc .sacc-opts {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
html.sacc .sacc-opt {
    position: relative;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 400;
    color: var(--color-primary);
    cursor: pointer;
}
html.sacc .sacc-opt .sacc-badge {
    margin-inline-start: auto;
}
/* no checkbox in the design system: a box drawn like the form fields, navy when ticked */
html.sacc .sacc-opt input {
    position: absolute;
    width: 0;
    height: 0;
    margin: 0;
    opacity: 0;
}
html.sacc .sacc-box {
    flex: none;
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    background: var(--surface-card);
    border: 1px solid var(--color-secondary-40);
    border-radius: var(--radius-sm);
    transition: background 150ms ease;
}
html.sacc .sacc-opt input:checked + .sacc-box {
    background: var(--color-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5 9.5 18 20 6.5'/%3E%3C/svg%3E") center / 12px 12px no-repeat;
    border-color: var(--color-primary);
}
html.sacc .sacc-opt input:focus-visible + .sacc-box {
    box-shadow: var(--focus-ring);
}
html.sacc .sacc-opt input:disabled + .sacc-box {
    opacity: 0.45;
}
html.sacc .sacc-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
html.sacc .sacc-field-label {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--color-accent-green);
}
html.sacc .sacc-input {
    width: 100%;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 14px;
    color: var(--color-primary);
    background: var(--surface-card);
    border: 1px solid var(--color-secondary-40);
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}
html.sacc .sacc-input:focus {
    border-color: var(--color-primary);
    box-shadow: var(--focus-ring);
}
html.sacc .sacc-field-hint {
    font-size: 12px;
    color: var(--color-primary-90);
}
html.sacc .sacc-hidden-check {
    display: none;
}
html.sacc .sacc-error {
    padding: 8px 12px;
    font-size: 12px;
    border-inline-start: 3px solid #C62828;
    border-radius: var(--radius-sm);
    background: #FDF3F3;
}
html.sacc .sacc-notify-output {
    font-size: 14px;
    color: var(--color-accent-green);
}
html.sacc .sacc-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}
html.sacc .sacc-dialog-actions .sacc-btn--outline {
    align-self: auto;
}
html.sacc .sacc-btn--primary:disabled {
    opacity: 0.45;
    cursor: default;
}

/* PHONE: the timeline rail moves to the left edge and each milestone stacks on three lines */
@media (max-width: 560px) {
    html.sacc .sacc-ms-row,
    html.sacc .sacc-ms-head {
        grid-template-columns: 2px minmax(0, 1fr);
        column-gap: 12px;
        row-gap: 0;
    }
    html.sacc .sacc-ms-row > span {
        padding: 0;
    }
    html.sacc .sacc-ms-row .sacc-ms-rail {
        grid-area: 1 / 1 / span 3 / auto;
    }
    html.sacc .sacc-ms-row .sacc-ms-time {
        grid-area: 1 / 2;
        text-align: left;
        padding-top: 8px;
    }
    html.sacc .sacc-ms-row .sacc-ms-code {
        grid-area: 2 / 2;
    }
    html.sacc .sacc-ms-row .sacc-ms-msg {
        grid-area: 3 / 2;
        padding-bottom: 8px;
    }
    html.sacc .sacc-ms-row .sacc-ms-dot {
        top: 12px;
    }
    html.sacc .sacc-ms-row.is-first .sacc-ms-rail {
        background-position: 0 17px;
    }
    html.sacc .sacc-ms-row.is-last .sacc-ms-rail {
        background-size: 2px 17px;
    }
    html.sacc .sacc-ms-head > span:first-child {
        display: none;
    }
    html.sacc .sacc-ms-head-rail {
        grid-area: 1 / 1;
    }
    html.sacc .sacc-ms-head-text {
        grid-area: 1 / 2;
        justify-self: start;
        padding-inline: 0;
        background: transparent;
    }
    html.sacc .sacc-chip {
        min-height: 44px;
    }
}

/* =====================================================================================
   SACC_TNT Arabic (?lang=ar sets lang="ar" dir="rtl" on <html>)
   Only the chrome translates; codes, messages, times, stations, flights and the AWB stay
   English and carry data-en, as in the design. The rest of this sheet is written with
   logical properties, so the layout mirrors on its own.
   ===================================================================================== */
/* IBM Plex Sans Arabic is the design's stand-in until the brand's Arabic face is chosen */
html.sacc[lang="ar"] body,
html.sacc[lang="ar"] input,
html.sacc[lang="ar"] button {
    font-family: "IBM Plex Sans Arabic", var(--font-family-base);
}
/* The aircraft is a physical shape and does not mirror with the text, so flip it explicitly -
   otherwise origin and destination swap sides while the nose keeps pointing the old way. */
html.sacc[dir="rtl"] .sacc-leg-craft {
    transform: rotate(-90deg);
}
html.sacc[dir="rtl"] .sacc-route-plane {
    transform: scaleX(-1);
}
html.sacc[dir="rtl"] [data-en] {
    direction: ltr;
    unicode-bidi: isolate;
    text-align: right;
}
html.sacc[dir="rtl"] .sacc-leg-dep [data-en] {
    text-align: left;
}
html.sacc[dir="rtl"] .sacc-status-msg > [data-sacc-msg] {
    flex: 1;
}
html.sacc[dir="rtl"] .sacc-status-meta,
html.sacc[dir="rtl"] .sacc-leg-arr {
    align-items: stretch;
}
/* AWB box (the tags plugin's type="tel" input). What is typed is an AWB number, so the field
   stays left-to-right and the cursor follows the last digit; it is right-aligned so it starts
   where Arabic text does. While empty it is right-to-left, so the Arabic hint reads correctly
   with its example AWB at the end of the sentence. */
html.sacc[dir="rtl"] .sacc-search .bootstrap-tagsinput input {
    direction: ltr;
    text-align: right;
}
html.sacc[dir="rtl"] .sacc-search .bootstrap-tagsinput input:placeholder-shown {
    direction: rtl;
}
/* the tag's x sits left of the AWB here, so the plugin's margin-left gap moves to its right:
   space between the AWB and the x, and the x against the tag's left edge */
html.sacc[dir="rtl"] .sacc-search .bootstrap-tagsinput .tag [data-role="remove"] {
    margin-left: 0;
    margin-right: 8px;
}
/* the date hugs the rail in both directions */
html.sacc[dir="rtl"] .sacc-ms-time {
    text-align: left;
}
/* Route map: the map stays left-to-right (it is geography; .sacc-map-box is dir="ltr"), but its
   texts read right-to-left. The legend reads RTL (swatch on the right of its label) and keeps its
   bottom-left corner, clear of the buttons; the hint reads RTL. Station codes and flight
   numbers stay English, as everywhere else on the card. */
html.sacc[lang="ar"] .sacc-cargo-map {
    --i2-font: "IBM Plex Sans Arabic", var(--font-family-base);
}
html.sacc[dir="rtl"] .sacc-cargo-map::part(legend) {
    direction: rtl;
    left: 12px;
    right: auto;
}
html.sacc[dir="rtl"] .sacc-cargo-map::part(hint) {
    direction: rtl;
}
