/* HEL Order Tracker — public customer tracking widget.
   v1.0.1 layout: two-column result box (left = order details,
   right = courier + expected delivery + scrollable tracking history).
   Visual language mirrors HEL Shipping Estimator (sage green). */

.hel-ot-card {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0,0,0,.06);
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.hel-ot-title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 800;
    color: #1a2233;
}

.hel-ot-subtitle {
    margin: 0 0 20px;
    font-size: 13px;
    color: #6b7280;
}

.hel-ot-row {
    margin-bottom: 12px;
}

.hel-ot-card input.hel-ot-input {
    width: 100% !important;
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 46px !important;
    padding: 12px 14px !important;
    line-height: 1.4 !important;
    border: 1.5px solid #e2e5ea !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-family: inherit !important;
    color: #333 !important;
    background-color: #fff !important;
    vertical-align: middle !important;
    margin: 0 !important;
}

.hel-ot-card input.hel-ot-input::placeholder {
    color: #8a94a3;
    opacity: 1;
    line-height: normal;
}

.hel-ot-input:focus {
    outline: none;
    border-color: #6a8f6b;
}

.hel-ot-btn {
    width: 100%;
    padding: 14px;
    margin-top: 4px;
    border: none;
    border-radius: 12px;
    background: #5f8161;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease;
}

.hel-ot-btn:hover { background: #506e52; }
.hel-ot-btn:disabled { opacity: .6; cursor: not-allowed; }

#hel_ot_result:empty { margin: 0; }

/* Result: main container */
.hel-ot-result-box {
    margin-top: 18px;
    padding: 20px;
    border-radius: 14px;
    background: #eef3ee;
    border: 1px solid #dbe6dc;
}

/* Header row: Order ID + Status badge */
.hel-ot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.hel-ot-order-id {
    font-size: 16px;
    font-weight: 700;
    color: #1a2233;
}
.hel-ot-awb-line {
    display: block;
    font-size: 12px;
    color: #4a5568;
    margin-top: 2px;
    font-weight: 500;
}

/* Status badge */
.hel-ot-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.hel-ot-badge-pending     { background: #fff3cd; color: #7a5a10; }
.hel-ot-badge-ready       { background: #dbe6f4; color: #234a75; }
.hel-ot-badge-picked      { background: #e4dbf4; color: #4d327a; }
.hel-ot-badge-transit     { background: #dbe6dc; color: #2f6b31; }
.hel-ot-badge-ofd         { background: #ffe0b3; color: #7a4a10; }
.hel-ot-badge-delivered   { background: #dcf3dd; color: #2f6b31; }
.hel-ot-badge-rto         { background: #fbe0e0; color: #a13a3a; }
.hel-ot-badge-cancelled   { background: #f0f0f0; color: #555; }

/* Divider */
.hel-ot-divider {
    height: 1px;
    background: #dbe6dc;
    margin: 14px 0;
}

/* Two-column grid — LEFT: order details, RIGHT: courier + EDD + tracking */
.hel-ot-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.hel-ot-col-left,
.hel-ot-col-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Info list — LEFT column (stacked, not 2-col grid anymore) */
.hel-ot-info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.hel-ot-info-item {
    font-size: 13px;
    color: #4a5568;
    line-height: 1.4;
}
.hel-ot-info-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #6b7280;
    margin-bottom: 3px;
    font-weight: 600;
}
.hel-ot-info-value {
    display: block;
    font-size: 14px;
    color: #1a2233;
    font-weight: 600;
}

/* Courier card — centered layout: logo on top, courier name below */
.hel-ot-courier {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px 14px;
    background: #fff;
    border: 1px solid #dbe6dc;
    border-radius: 10px;
    text-align: center;
}
.hel-ot-courier-logo {
    max-width: 120px;
    max-height: 44px;
    object-fit: contain;
}
.hel-ot-courier-name {
    font-size: 14px;
    font-weight: 600;
    color: #1a2233;
    text-align: center;
}

/* Delivery info highlight card (matches Doc 1 §22.3 pattern) */
.hel-ot-delivery-card {
    background: #f5faf5;
    border: 1px solid #dbe6dc;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.hel-ot-delivery-card-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #4a5568;
    font-weight: 600;
}
.hel-ot-delivery-card-value {
    font-size: 15px;
    font-weight: 700;
    color: #1a2233;
}

/* Timeline card — white background, scrollable, ~3 scans visible at a time */
.hel-ot-timeline-card {
    background: #fff;
    border: 1px solid #dbe6dc;
    border-radius: 10px;
    padding: 14px;
}

.hel-ot-timeline-title {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
    color: #1a2233;
    letter-spacing: .3px;
}

.hel-ot-timeline-scroll {
    max-height: 220px;
    overflow-y: auto;
    padding-right: 6px;
    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #cddccd transparent;
}
.hel-ot-timeline-scroll::-webkit-scrollbar {
    width: 6px;
}
.hel-ot-timeline-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.hel-ot-timeline-scroll::-webkit-scrollbar-thumb {
    background: #cddccd;
    border-radius: 3px;
}

.hel-ot-timeline {
    position: relative;
    padding-left: 22px;
    margin: 0;
    list-style: none;
}
.hel-ot-timeline::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: #dbe6dc;
    border-radius: 1px;
}

.hel-ot-timeline-item {
    position: relative;
    padding: 0 0 12px 0;
}
.hel-ot-timeline-item:last-child { padding-bottom: 0; }

.hel-ot-timeline-item::before {
    content: "";
    position: absolute;
    left: -22px;
    top: 3px;
    width: 14px;
    height: 14px;
    background: #fff;
    border: 3px solid #cddccd;
    border-radius: 50%;
    box-sizing: border-box;
}
.hel-ot-timeline-item.is-latest::before {
    border-color: #5f8161;
    background: #5f8161;
}

.hel-ot-timeline-status {
    font-size: 13px;
    font-weight: 600;
    color: #1a2233;
    line-height: 1.35;
}
.hel-ot-timeline-meta {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
    line-height: 1.35;
}
.hel-ot-timeline-meta strong { color: #4a5568; font-weight: 600; }

.hel-ot-timeline-empty {
    padding: 16px;
    text-align: center;
    color: #6b7280;
    font-size: 13px;
    background: #f9fafb;
    border: 1px dashed #e2e5ea;
    border-radius: 10px;
}

/* Error box */
.hel-ot-error-box {
    margin-top: 18px;
    padding: 16px 20px;
    border-radius: 14px;
    background: #fbe0e0;
    color: #a13a3a;
    font-size: 14px;
    font-weight: 600;
}

.hel-ot-footnote {
    margin: 16px 0 0;
    font-size: 12px;
    color: #8a94a3;
    text-align: center;
}

.hel-ot-error { color: #a13a3a; font-weight: 600; }

/* Tablet & mobile — stack columns vertically */
@media (max-width: 720px) {
    .hel-ot-columns {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .hel-ot-card { padding: 24px 20px; }
    .hel-ot-delivery-card { flex-direction: column; align-items: flex-start; gap: 4px; }
}
