/* ==========================================
   ORDER DETAILS PAGE
========================================== */

.order-details-page {
    background: #f5f5f5;

    min-height: 70vh;

    padding: 45px 0 70px;
}


/* ==========================================
   HEADER
========================================== */

.order-details-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 25px;

    margin-bottom: 25px;
}

.order-details-eyebrow {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    margin-bottom: 8px;

    color: #0D5CB6;

    font-size: 12px;

    font-weight: 700;
}

.order-details-header h1 {
    margin: 0 0 8px;

    color: #222;

    font-size: 32px;
}

.order-details-header p {
    margin: 0;

    color: #666;

    font-size: 13px;
}

.order-details-back {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    padding: 11px 18px;

    background: #fff;

    border: 1px solid #ddd;

    border-radius: 4px;

    color: #444;

    font-size: 12px;

    font-weight: 700;

    text-decoration: none;
}

.order-details-back:hover {
    color: #0D5CB6;

    border-color: #0D5CB6;
}


/* ==========================================
   STATUS BANNER
========================================== */

.order-status-banner {
    display: flex;

    align-items: center;

    gap: 15px;

    padding: 18px 22px;

    margin-bottom: 25px;

    background: #fff;

    border: 1px solid #e5e5e5;

    border-radius: 8px;
}

.order-status-banner__icon {
    width: 45px;

    height: 45px;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;

    background: #eef5fc;

    border-radius: 50%;

    color: #0D5CB6;
}

.order-status-banner__content {
    flex: 1;
}

.order-status-banner__content span {
    display: block;

    margin-bottom: 4px;

    color: #888;

    font-size: 10px;

    font-weight: 700;
}

.order-status-banner__content strong {
    color: #222;

    font-size: 15px;
}


/* ==========================================
   LAYOUT
========================================== */

.order-details-layout {
    display: grid;

    grid-template-columns: minmax(0, 1fr) 330px;

    gap: 25px;

    align-items: start;
}

.order-details-main,
.order-details-sidebar {
    min-width: 0;
}


/* ==========================================
   PANELS
========================================== */

.order-details-panel {
    margin-bottom: 20px;

    background: #fff;

    border: 1px solid #e5e5e5;

    border-radius: 8px;

    overflow: hidden;
}

.order-details-panel__header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    padding: 20px 22px;

    border-bottom: 1px solid #e5e5e5;
}

.order-details-panel__header span {
    display: block;

    margin-bottom: 5px;

    color: #0D5CB6;

    font-size: 10px;

    font-weight: 700;
}

.order-details-panel__header h2 {
    margin: 0;

    color: #222;

    font-size: 19px;
}

.order-details-panel__header > strong {
    color: #777;

    font-size: 12px;
}


/* ==========================================
   ORDER ITEMS
========================================== */

.order-items {
    padding: 0 22px;
}

.order-item {
    display: grid;

    grid-template-columns: 70px minmax(0, 1fr) auto;

    align-items: center;

    gap: 15px;

    padding: 18px 0;

    border-bottom: 1px solid #eee;
}

.order-item:last-child {
    border-bottom: 0;
}

.order-item__image {
    width: 70px;

    height: 70px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #f5f5f5;

    border: 1px solid #eee;

    border-radius: 5px;

    overflow: hidden;

    color: #aaa;
}

.order-item__image img {
    width: 100%;

    height: 100%;

    object-fit: cover;
}

.order-item__info {
    min-width: 0;
}

.order-item__info h3 {
    margin: 0 0 7px;

    color: #222;

    font-size: 14px;

    line-height: 1.4;
}

.order-item__info span {
    display: inline-block;

    margin-right: 12px;

    color: #777;

    font-size: 11px;
}

.order-item__info small {
    color: #777;

    font-size: 11px;
}

.order-item__total {
    color: #222;

    font-size: 14px;

    font-weight: 700;

    white-space: nowrap;
}

.order-items-empty {
    padding: 30px 0;

    color: #777;

    font-size: 13px;

    text-align: center;
}


/* ==========================================
   ORDER SUMMARY
========================================== */

.order-summary {
    padding: 18px 22px;
}

.order-summary > div {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    padding: 9px 0;

    color: #666;

    font-size: 13px;
}

.order-summary > div strong {
    color: #333;
}

.order-summary__discount {
    color: #217a3a !important;
}

.order-summary__discount strong {
    color: #217a3a !important;
}

.order-summary__total {
    margin-top: 8px;

    padding-top: 16px !important;

    border-top: 1px solid #e5e5e5;

    color: #222 !important;

    font-size: 15px !important;
}

.order-summary__total strong {
    color: #0D5CB6 !important;

    font-size: 18px;
}


/* ==========================================
   DELIVERY DETAILS
========================================== */

.delivery-details {
    padding: 18px 22px;
}

.delivery-detail {
    display: flex;

    align-items: flex-start;

    gap: 12px;

    padding: 13px 0;

    border-bottom: 1px solid #eee;
}

.delivery-detail:first-child {
    padding-top: 0;
}

.delivery-detail:last-child {
    padding-bottom: 0;

    border-bottom: 0;
}

.delivery-detail > i {
    width: 20px;

    margin-top: 2px;

    color: #0D5CB6;

    text-align: center;
}

.delivery-detail span {
    display: block;

    margin-bottom: 5px;

    color: #888;

    font-size: 10px;
}

.delivery-detail strong {
    display: block;

    color: #333;

    font-size: 12px;

    line-height: 1.6;

    word-break: break-word;
}


/* ==========================================
   PAYMENT DETAILS
========================================== */

.payment-details {
    padding: 18px 22px;
}

.payment-details > div {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    padding: 10px 0;

    border-bottom: 1px solid #eee;
}

.payment-details > div:last-child {
    border-bottom: 0;
}

.payment-details span {
    color: #888;

    font-size: 11px;
}

.payment-details > div > strong {
    color: #333;

    font-size: 12px;

    text-align: right;
}


/* ==========================================
   PAYMENT STATUS
========================================== */

.payment-status {
    display: inline-block;

    padding: 5px 9px;

    border-radius: 3px;

    font-size: 10px !important;

    font-weight: 700;
}

.payment-status--paid {
    background: #edf8f1;

    color: #217a3a !important;
}

.payment-status--pending {
    background: #fff8e6;

    color: #9a6700 !important;
}

.payment-status--failed {
    background: #fff1f1;

    color: #b42323 !important;
}

.payment-status--refunded {
    background: #f0f0f0;

    color: #666 !important;
}


/* ==========================================
   ORDER STATUS
========================================== */

.order-status {
    display: inline-block;

    padding: 5px 9px;

    border-radius: 3px;

    font-size: 10px;

    font-weight: 700;

    white-space: nowrap;
}

.order-status--pending {
    background: #fff8e6;

    color: #9a6700;
}

.order-status--confirmed {
    background: #eef5fc;

    color: #0D5CB6;
}

.order-status--preparing {
    background: #f2edff;

    color: #6541a5;
}

.order-status--out-for-delivery {
    background: #eef8f7;

    color: #08756f;
}

.order-status--completed,
.order-status--delivered {
    background: #edf8f1;

    color: #217a3a;
}

.order-status--cancelled {
    background: #fff1f1;

    color: #b42323;
}


/* ==========================================
   STATUS TIMELINE
========================================== */

.order-timeline {
    padding: 20px 22px 25px;
}

.order-timeline__item {
    position: relative;

    display: flex;

    gap: 15px;

    padding-bottom: 25px;
}

.order-timeline__item:last-child {
    padding-bottom: 0;
}

.order-timeline__item:not(:last-child)::before {
    content: '';

    position: absolute;

    left: 12px;

    top: 27px;

    bottom: 0;

    width: 1px;

    background: #dfe5eb;
}

.order-timeline__marker {
    position: relative;

    z-index: 1;

    width: 25px;

    height: 25px;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;

    background: #eef5fc;

    border: 1px solid #cbdff4;

    border-radius: 50%;

    color: #0D5CB6;

    font-size: 9px;
}

.order-timeline__content {
    flex: 1;

    min-width: 0;
}

.order-timeline__top {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    margin-bottom: 5px;
}

.order-timeline__top strong {
    color: #333;

    font-size: 13px;
}

.order-timeline__top time {
    color: #999;

    font-size: 10px;

    white-space: nowrap;
}

.order-timeline__content p {
    margin: 0;

    color: #777;

    font-size: 11px;

    line-height: 1.6;
}

.order-history-empty {
    padding: 30px 22px;

    color: #888;

    text-align: center;
}

.order-history-empty i {
    margin-bottom: 10px;

    color: #bbb;

    font-size: 25px;
}

.order-history-empty p {
    margin: 0;

    font-size: 12px;
}


/* ==========================================
   CUSTOMER NOTES
========================================== */

.order-customer-notes {
    padding: 20px 22px;

    color: #555;

    font-size: 12px;

    line-height: 1.7;
}


/* ==========================================
   RESPONSIVE
========================================== */

@media (max-width: 900px) {

    .order-details-layout {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 650px) {

    .order-details-page {
        padding: 35px 0 55px;
    }

    .order-details-header {
        align-items: flex-start;

        flex-direction: column;
    }

    .order-details-header h1 {
        font-size: 27px;
    }

    .order-status-banner {
        align-items: flex-start;

        flex-wrap: wrap;
    }

    .order-status-banner__content {
        min-width: 150px;
    }

    .order-status-banner > .order-status {
        margin-left: 60px;
    }

    .order-item {
        grid-template-columns: 60px minmax(0, 1fr);
    }

    .order-item__image {
        width: 60px;

        height: 60px;
    }

    .order-item__total {
        grid-column: 2;

        justify-self: start;

        margin-top: -8px;
    }

    .order-timeline__top {
        align-items: flex-start;

        flex-direction: column;

        gap: 3px;
    }

}