/* Ported from etrack.wicelogistics.com (public/css/app.css, navbar.css, welcome_style, main_style). */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --wice-navy: #1A2067;
    --wice-blue: #2A388F;
    --wice-red: #EC1C24;
    --wice-grey: #A0A0A0;
    --wice-green: #4FBC6F;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

main {
    flex: 1;
}

.content {
    margin-top: 105px;
}

footer {
    margin-top: auto;
}

/* ── Navbar ─────────────────────────────────────────────────────────────── */
.navbar {
    height: 80px;
    box-shadow: 0 4px 30px #B8C1EA;
}

.name_nav {
    font-weight: 400;
    font-size: 23px;
    line-height: 38px;
    color: var(--wice-blue);
}

.btn_login {
    border-radius: 50px;
    width: 165px;
    height: 48px;
    font-weight: 300;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-wice {
    background: var(--wice-blue);
    color: #FFF;
}

.btn-wice:hover {
    background: #3646af;
    color: #FFF;
}

.btn-wice-red {
    background: var(--wice-red);
    color: #FFF;
}

.btn-wice-red:hover {
    background: #bb2d3b;
    color: #FFF;
}

/* ── Search panel ───────────────────────────────────────────────────────── */
.head_text {
    font-weight: 600;
    font-size: 40px;
    color: var(--wice-navy);
}

.sub_text {
    color: var(--wice-grey);
    font-size: 16px;
}

.type_row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    padding-top: 16px;
    padding-bottom: 10px;
}

.tracking_step { font-size: 18px; font-weight: 600; color: var(--wice-navy); margin: 0; }
.step_number { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-right: 7px; border-radius: 50%; background: #edf0ff; color: var(--wice-blue); font-size: 15px; }
.mode_hint { color: #68718a; font-size: 14px; margin: 8px 0 18px; }
.search_step_header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.tracking_mode_summary { color: var(--wice-blue); background: #edf0ff; border-radius: 20px; padding: 6px 12px; font-size: 13px; font-weight: 600; }

.btn_select {
    position: relative;
    transition: transform .18s ease, box-shadow .18s ease;
    box-shadow: 0 4px 16px rgba(26, 32, 103, .12);
    border-radius: 20px !important;
    width: 150px;
    height: 150px;
    color: var(--wice-red);
    font-size: 15px;
    line-height: 1.2;
    padding: 10px;
}

.btn_select i {
    font-size: 48px;
}

.btn_select.active {
    background-color: var(--wice-navy) !important;
    color: #FFF;
    transform: translateY(-4px) scale(1.06);
    box-shadow: 0 0 0 3px #c5ceff, 0 0 28px rgba(71, 92, 221, .38), 0 10px 24px rgba(26, 32, 103, .2);
}

.selected_badge { display: none; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); border-radius: 20px; padding: 5px 11px; background: #fff; color: var(--wice-navy); border: 1px solid #c5ceff; font-size: 11px; font-weight: 600; white-space: nowrap; }
.btn_select.active .selected_badge { display: block; }
.btn_select:not(.active):hover { transform: translateY(-3px); box-shadow: 0 6px 22px rgba(26, 32, 103, .22); }
.btn_select:focus-visible { outline: 3px solid var(--wice-blue); outline-offset: 6px; }
@media (prefers-reduced-motion: reduce) { .btn_select { transition: none; } }

.input_block {
    background: #FFFFFF;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.25);
    border-radius: 10px !important;
    width: 80% !important;
    min-height: 148px !important;
    padding: 30px !important;
}

.sea_mode {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    margin-bottom: 14px;
    background: #F1F2F8;
    border-radius: 30px;
}

.sea_mode_btn {
    border: 0;
    background: none;
    border-radius: 30px;
    padding: 7px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--wice-grey);
}

.sea_mode_btn.active {
    background: var(--wice-navy);
    color: #FFFFFF;
}

.input_size {
    height: 50px;
    text-transform: uppercase;
}

.input_size::placeholder {
    color: var(--wice-grey) !important;
    text-transform: none;
}

.btn_input {
    width: fit-content;
    height: 50px;
    border-radius: 5px !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

#sealineWrap .form-select {
    min-width: 250px;
}

#notFound {
    background: #FFFFFF;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.25);
    border-radius: 10px !important;
    width: 80% !important;
    padding: 50px !important;
    display: flex;
}

.not_found_text {
    font-size: 20px;
    color: #D9292C;
}

.bg_vector {
    position: absolute;
    right: 0;
    z-index: -1;
    max-width: 100%;
    width: 78%;
    top: 15rem;
}

/* ── Result cards ───────────────────────────────────────────────────────── */
.info_block {
    background: #FFFFFF;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    color: var(--wice-blue);
    margin: 20px 0;
    padding: 20px;
}

.result_head {
    font-weight: 600;
    font-size: 22px;
    color: var(--wice-blue);
}

.badge_status {
    min-width: 120px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 20px;
    padding: 6px 16px;
    color: #FFF;
    background-color: var(--wice-blue);
}

.badge_status.delivered {
    background-color: var(--wice-green);
}

.badge_status.booked {
    background-color: var(--wice-grey);
}

.field_label {
    font-size: 12px;
    color: var(--wice-grey);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.field_value {
    font-size: 16px;
    font-weight: 500;
    color: var(--wice-blue);
    word-break: break-word;
}

.refs_block {
    margin-top: 6px;
}

.detail_section {
    margin-bottom: 8px;
}

.detail_section .cross_heading {
    margin-bottom: 10px;
}

.refs_row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ref_chip {
    border: 1px solid #DDE0EE;
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 13px;
    color: var(--wice-blue);
    background: #FAFBFF;
}

/* ── Milestone timeline ─────────────────────────────────────────────────── */
.timeline_row {
    display: flex;
    justify-content: space-between;
    overflow-x: auto;
    padding: 10px 0 0;
}

.timeline_step {
    flex: 1 1 0;
    min-width: 120px;
    text-align: center;
    position: relative;
}

.img_radius {
    width: 60px;
    height: 60px;
    border: 3px solid var(--wice-navy);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    color: var(--wice-navy);
    font-size: 22px;
}

.timeline_step.todo .img_radius {
    border-color: var(--wice-grey);
    color: var(--wice-grey);
}

.step_text {
    margin-top: 5px;
    font-size: 0.8rem;
    display: block;
    color: var(--wice-blue);
}

.timeline_step.todo .step_text {
    color: var(--wice-grey);
}

.circle {
    width: 20px;
    height: 20px;
    background: var(--wice-blue);
    border: 2.5px solid var(--wice-navy);
    border-radius: 20px;
    position: relative;
    z-index: 1;
    margin: 0 auto;
}

.timeline_step.todo .circle {
    background: #EFEFEF;
    border-color: #D9D9D9;
}

/* The connector spans from this circle's centre to the next one, so it stays
   joined regardless of how wide each step grows. */
.circle_track {
    position: relative;
    height: 20px;
    margin: 10px 0 6px;
}

.circle_track:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(100% + 12px);
    height: 5px;
    transform: translateY(-50%);
    background-color: #E9E9EF;
    border-radius: 3px;
}

.timeline_step.linked .circle_track:before {
    background-color: var(--wice-blue);
}

.timeline_step.last .circle_track:before {
    display: none;
}

.date_status {
    font-size: 0.75rem;
    color: var(--wice-blue);
    display: block;
}

.timeline_step.todo .date_status {
    color: var(--wice-grey);
}

/* ── Sea freight: booking header and container cards ────────────────────── */
.sea_header_block {
    background: #FFFFFF;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.18);
    border-radius: 10px;
    margin-top: 30px;
    overflow: hidden;
}

.header_cell {
    padding: 18px 24px;
    border-right: 1px solid #E2E2E2;
}

.header_cell:last-child {
    border-right: none;
}

.header_line {
    line-height: 2;
}

.header_label {
    font-weight: 600;
    color: var(--wice-navy);
}

.header_value {
    font-weight: 400;
    color: var(--wice-blue);
    word-break: break-word;
}

.containers_head {
    font-weight: 700;
    font-size: 34px;
    color: var(--wice-navy);
    margin: 0;
}

.containers_count {
    width: 38px;
    height: 38px;
    border: 2px solid var(--wice-navy);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--wice-navy);
}

.container_block {
    background: #FFFFFF;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.18);
    border-radius: 10px;
    padding: 20px 24px 24px;
    margin-bottom: 24px;
}

.step_icon_img {
    max-width: 100%;
    max-height: 100%;
    padding: 4px;
}

/* Container timelines carry facility names, so steps need more room than the
   compact job timeline. */
.container_block .timeline_step {
    min-width: 160px;
    padding: 0 6px;
}

.container_block .step_text {
    white-space: nowrap;
}

.text_status {
    font-size: 0.8rem;
    display: block;
    color: var(--wice-navy);
    font-weight: 500;
}

.timeline_step.todo .text_status {
    color: var(--wice-grey);
}

.facility_status {
    font-size: 0.7rem;
    display: block;
    color: var(--wice-grey);
}

/* ── Cross-border: realtime ETL feed ────────────────────────────────────── */
.cross_panel {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #ECECF3;
}

.cross_heading {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wice-grey);
    margin-bottom: 14px;
}

.cross_head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-bottom: 8px;
}

.cross_stage {
    background: var(--wice-navy);
    color: #FFFFFF;
    border-radius: 20px;
    padding: 5px 16px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.cross_meta {
    font-size: 14px;
    font-weight: 500;
    color: var(--wice-blue);
}

.cross_toggle {
    margin-left: auto;
    border: 0;
    background: none;
    color: var(--wice-grey);
    font-size: 13px;
}

.cross_toggle:hover {
    color: var(--wice-blue);
}

.cross_icon_track {
    position: relative;
}

.cross_icon_track:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(100% + 12px);
    height: 4px;
    transform: translateY(-50%);
    background-color: #E9E9EF;
    border-radius: 2px;
}

.cross_step.linked .cross_icon_track:before {
    background-color: var(--wice-blue);
}

.cross_step.last .cross_icon_track:before {
    display: none;
}

.cross_step .img_radius {
    position: relative;
    z-index: 1;
    width: 48px;
    height: 48px;
    font-size: 17px;
    border-width: 3px;
    border-color: var(--wice-navy);
    background: #FFFFFF;
    color: var(--wice-navy);
}

.cross_step.todo .img_radius {
    border-color: #D9D9D9;
    background: #FAFAFA;
    color: var(--wice-grey);
}

.cross_step .step_text {
    margin-top: 10px;
    font-weight: 600;
    color: var(--wice-blue);
}

.cross_step.todo .step_text {
    color: var(--wice-grey);
}

.cross_details {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.cross_detail_card {
    flex: 1 1 260px;
    border: 1px solid #ECECF3;
    border-radius: 8px;
    padding: 10px 14px;
}

.cross_detail_title {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--wice-grey);
    margin-bottom: 4px;
}

.cross_detail_row {
    padding: 6px 0;
    border-bottom: 1px solid #F4F4F8;
}

.cross_detail_row:last-child {
    border-bottom: none;
}

.cross_detail_head {
    font-size: 13px;
    font-weight: 500;
    color: var(--wice-blue);
}

.cross_detail_sub {
    font-size: 12px;
    color: var(--wice-grey);
}

/* ── Loader ─────────────────────────────────────────────────────────────── */
.loader-loading {
    width: 48px;
    height: 48px;
    border: 5px solid #E6E9F5;
    border-bottom-color: var(--wice-red);
    border-radius: 50%;
    display: inline-block;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    to { transform: rotate(360deg); }
}

@media screen and (max-width: 768px) {
    .head_text {
        font-size: 26px;
    }

    .input_block,
    #notFound {
        width: 100% !important;
        padding: 20px !important;
    }

    .btn_select {
        width: 130px;
        height: 130px;
        font-size: 13px;
    }

    .btn_login {
        width: 120px !important;
        height: 40px !important;
        font-size: 15px !important;
    }
}

/* Shipment results: route and progress first, supporting details below. */
#results { max-width: 1320px; margin-inline: auto; }
.info_block, .sea_header_block, .container_block {
    border: 1px solid #e3e7f1;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(26, 32, 103, .08);
}
.vessel_panel { margin: 40px 0 24px; }
.vessel_panel .containers_head { margin-bottom: 16px; overflow-wrap: anywhere; }
.vessel_map { display: block; width: 100%; height: 420px; border: 0; border-radius: 12px; }
.info_block { padding: 28px; margin: 24px 0; }
.result_header { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 24px; }
.result_eyebrow { color: #68718a; text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 600; margin-bottom: 6px; }
.result_head { font-size: clamp(19px, 2vw, 25px); letter-spacing: -.035em; color: var(--wice-navy); margin: 0; }
.match_hint { margin-left: auto; font-size: 11px; color: #68718a; background: #f4f6fa; padding: 7px 11px; border-radius: 6px; }
.badge_status { min-width: 0; font-size: 12px; padding: 7px 13px; background: #edf0ff; color: var(--wice-blue); font-weight: 600; }
.badge_status::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 7px; background: currentColor; vertical-align: middle; }
.badge_status.delivered { background: #e9f7ef; color: #237447; }
.badge_status.booked { background: #eef0f5; color: #566179; }
.route_summary { display: grid; grid-template-columns: minmax(0, 1fr) 90px minmax(0, 1fr) minmax(180px, 1fr); align-items: center; gap: 24px; background: #f5f7fc; border: 1px solid #e8ecf5; border-radius: 12px; padding: 24px; margin-bottom: 24px; }
.route_place { font-size: clamp(22px, 2.5vw, 32px); font-weight: 600; letter-spacing: -.04em; color: var(--wice-navy); overflow-wrap: anywhere; }
.route_name { color: #68718a; font-size: 12px; }
.route_connector { display: flex; align-items: center; gap: 10px; color: var(--wice-blue); }
.route_connector::before, .route_connector::after { content: ''; height: 1px; flex: 1; background: #c7cfe5; }
.route_arrival { border-left: 1px solid #dce2ef; padding-left: 24px; }
.info_block .field_label { font-size: 10px; color: #68718a; letter-spacing: .055em; margin-bottom: 5px; }
.info_block .field_value { color: #283453; font-size: 13px; line-height: 1.65; font-weight: 500; }
.info_block .cross_heading { color: #535f7c; font-size: 11px; letter-spacing: .09em; margin-bottom: 18px; }
.detail_section { padding-top: 24px; margin: 0; border-top: 1px solid #e9edf4; }
.detail_section + .detail_section { margin-top: 8px; }
.detail_section .row { --bs-gutter-x: 28px; }
.detail_section .row > div { margin-bottom: 22px !important; }
.refs_block { border-top: 1px solid #e9edf4; padding-top: 20px; margin-top: 4px; }
.refs_block .cross_heading { margin-bottom: 10px; }
.ref_chip { font-size: 11px; border-radius: 6px; padding: 6px 10px; background: #f8f9fc; }
.progress_panel { padding: 0 0 26px; }
.progress_panel .cross_panel { margin: 0; padding: 0; border: 0; }
.shipment_timeline { list-style: none; margin: 0; padding: 6px 0 12px; }
.shipment_timeline .img_radius { width: 42px; height: 42px; font-size: 16px; border: 1px solid #dbe1f2; background: #edf1fb; }
.shipment_timeline .step_text { font-size: 11px; font-weight: 600; margin-top: 12px; min-height: 34px; padding: 0 8px; }
.shipment_timeline .circle { width: 12px; height: 12px; border-width: 2px; }
.shipment_timeline .circle_track { height: 12px; margin: 4px 0 12px; }
.shipment_timeline .circle_track::before { height: 2px; width: 100%; }
.shipment_timeline .date_status { color: #63708a; font-size: 10px; padding: 0 8px; font-variant-numeric: tabular-nums; }
.shipment_timeline .todo .img_radius { background: #f7f8fb; border-color: #dce1eb; color: #7d879b; }
.shipment_timeline .todo .step_text, .shipment_timeline .todo .date_status { color: #737f94; }
@media (max-width: 767px) {
    .info_block { padding: 20px 16px; border-radius: 14px; }
    .result_header { gap: 10px; }
    .result_identity { flex: 1 1 220px; }
    .match_hint { margin-left: 0; }
    .route_summary { grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr); gap: 12px; padding: 18px; }
    .route_arrival { grid-column: 1 / -1; border-left: 0; border-top: 1px solid #dce2ef; padding: 14px 0 0; }
    .shipment_timeline { display: block; overflow: visible; }
    .shipment_timeline .timeline_step { display: grid; grid-template-columns: 42px 1fr; column-gap: 16px; text-align: left; padding-bottom: 24px; min-width: 0; }
    .shipment_timeline .img_radius { grid-row: 1 / 3; position: relative; z-index: 1; }
    .shipment_timeline .step_text { margin: 0; padding: 0; min-height: 0; align-self: end; font-size: 12px; }
    .shipment_timeline .date_status { grid-column: 2; padding: 3px 0 0; font-size: 11px; }
    .shipment_timeline .circle_track { position: absolute; left: 20px; top: 42px; height: calc(100% - 42px); width: 2px; margin: 0; }
    .shipment_timeline .circle { display: none; }
    .shipment_timeline .circle_track::before { inset: 0; width: 2px; height: 100%; transform: none; }
    .shipment_timeline .last { padding-bottom: 0; }
}
