﻿/* =========================================================
   ORDER SUMMARY
========================================================= */

.order-summary-title {
    margin: 0 0 4px;
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.order-summary-subtitle {
    margin-bottom: 18px;
    color: #6c757d;
    font-size: 0.95rem;
}


/* =========================================================
   ORDER TYPE BANNER
   Collection / Delivery
========================================================= */

.order-type-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    margin-bottom: 18px;
    padding: 12px 18px;
    border: 2px solid #198754;
    border-radius: 12px;
    background: #eaf7f0;
    color: #146c43;
    font-size: 1.15rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}


/* =========================================================
   SUMMARY WRAPPER
========================================================= */

.order-summary-wrap {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-bottom: 95px;
}


/* =========================================================
   SUMMARY CARDS
========================================================= */

.summary-block {
    overflow: hidden;
    border: 1px solid #dee2e6;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04), 0 8px 20px rgba(0, 0, 0, 0.04);
}

.summary-block-header {
    display: flex;
    align-items: center;
    padding: 13px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    color: #212529;
    font-size: 1rem;
    font-weight: 700;
}

    .summary-block-header i {
        color: #198754;
    }

.summary-block-body {
    padding: 16px;
}


/* =========================================================
   CUSTOMER CONTACT DETAILS
   Name / Phone / Email
========================================================= */

.summary-contact-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 0.8fr) minmax(260px, 1.4fr);
    gap: 16px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    background: #f8f9fa;
}

.summary-contact-item {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 3px;
}

    .summary-contact-item .summary-detail-label {
        display: flex;
        align-items: center;
        color: #6c757d;
        font-size: 0.78rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

        .summary-contact-item .summary-detail-label i {
            color: #198754;
        }

    .summary-contact-item .summary-detail-value {
        display: block;
        min-width: 0;
        color: #212529;
        font-size: 0.95rem;
        font-weight: 700;
        text-align: left;
        overflow-wrap: anywhere;
        word-break: break-word;
    }


/* =========================================================
   NORMAL CUSTOMER DETAILS
   Used for Notes etc.
========================================================= */

.summary-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 10px 2px;
    border-bottom: 1px solid #f0f0f0;
}

    .summary-detail-row:last-child {
        border-bottom: 0;
    }

.summary-detail-label {
    flex-shrink: 0;
    color: #6c757d;
    font-size: 0.88rem;
    font-weight: 600;
}

.summary-detail-value {
    color: #212529;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: right;
    overflow-wrap: anywhere;
}


/* =========================================================
   IMPORTANT ADDRESS / COLLECTION BOX
========================================================= */

.summary-important-box {
    position: relative;
    margin: 16px 0;
    padding: 16px 18px;
    border: 2px solid #0d6efd;
    border-radius: 12px;
    background: #f1f7ff;
    box-shadow: 0 3px 10px rgba(13, 110, 253, 0.08);
}

    .summary-important-box::before {
        content: "";
        position: absolute;
        top: 10px;
        bottom: 10px;
        left: 0;
        width: 4px;
        border-radius: 0 4px 4px 0;
        background: #0d6efd;
    }

.summary-important-title {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    color: #0b5ed7;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.summary-important-value {
    color: #212529;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.45;
}

.summary-postcode-row {
    margin-top: 9px;
    padding-top: 9px;
    border-top: 1px solid #cfe2ff;
    color: #495057;
    font-size: 0.9rem;
}

    .summary-postcode-row strong {
        margin-left: 4px;
        color: #212529;
        font-size: 1rem;
    }


/* =========================================================
   DATE + SESSION
   Important customer confirmation
========================================================= */

.summary-order-check {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.summary-check-item {
    padding: 14px 16px;
    border: 2px solid #ffc107;
    border-radius: 12px;
    background: #fff9e6;
    text-align: center;
}

.summary-check-label {
    margin-bottom: 5px;
    color: #7a5b00;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

    .summary-check-label i {
        color: #d39e00;
    }

.summary-check-value {
    color: #212529;
    font-size: 1.12rem;
    font-weight: 800;
    line-height: 1.25;
}


/* =========================================================
   CART ITEMS
========================================================= */

.summary-cart-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#summary-cart-empty {
    padding: 18px;
    border-radius: 8px;
    background: #f8f9fa;
    color: #6c757d;
    text-align: center;
}


/* =========================================================
   TOTALS
========================================================= */

.summary-block-total {
    border: 2px solid #198754;
}

    .summary-block-total .summary-block-header {
        background: #eaf7f0;
        border-bottom-color: #c3e6cb;
        color: #146c43;
    }

.summary-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 2px;
    color: #495057;
    font-size: 0.95rem;
}

    .summary-total-row span:last-child {
        color: #212529;
        font-weight: 700;
    }

.summary-discount-row {
    color: #198754;
}

    .summary-discount-row span {
        color: #198754 !important;
        font-weight: 700;
    }


/* =========================================================
   GRAND TOTAL
========================================================= */

.summary-grand-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding: 15px 16px;
    border-radius: 10px;
    background: #198754;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 800;
}

#summary-grand-total {
    font-size: 1.35rem;
    font-weight: 800;
}


/* =========================================================
   BOTTOM ACTION BAR
========================================================= */

.order-action-bar {
    padding: 10px 0;
    border-top: 1px solid #dee2e6;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(8px);
}

.order-action-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.action-back-btn {
    padding: 10px 15px;
    color: #495057;
    font-weight: 600;
    text-decoration: none;
}

    .action-back-btn:hover {
        color: #212529;
    }

.action-submit-btn {
    min-width: 180px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 800;
    box-shadow: 0 3px 10px rgba(25, 135, 84, 0.22);
}

    .action-submit-btn:hover {
        transform: translateY(-1px);
    }


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    .summary-contact-row {
        grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) minmax(220px, 1.4fr);
        gap: 12px;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 576px) {

    .order-summary-title {
        font-size: 1.35rem;
    }

    .summary-block-body {
        padding: 13px;
    }


    /* -----------------------------------------
       Contact details
       Name + Phone first row
       Email second row
    ----------------------------------------- */

    .summary-contact-row {
        grid-template-columns: 1fr 1fr;
        gap: 10px 14px;
        padding: 11px 12px;
    }

    .summary-contact-item:nth-child(3) {
        grid-column: 1 / -1;
    }

    .summary-contact-item .summary-detail-label {
        font-size: 0.72rem;
    }

    .summary-contact-item .summary-detail-value {
        font-size: 0.9rem;
    }


    /* -----------------------------------------
       Date / Session
    ----------------------------------------- */

    .summary-order-check {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .summary-check-item {
        padding: 12px 8px;
    }

    .summary-check-value {
        font-size: 1rem;
    }


    /* -----------------------------------------
       Normal details
    ----------------------------------------- */

    .summary-detail-row {
        gap: 10px;
    }

    .summary-detail-value {
        max-width: 65%;
    }


    /* -----------------------------------------
       Address / Collection
    ----------------------------------------- */

    .summary-important-box {
        padding: 14px 15px;
    }


    /* -----------------------------------------
       Buttons
    ----------------------------------------- */

    .action-submit-btn {
        min-width: 155px;
        padding: 11px 16px;
    }
}


/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    /*
       Keep Name and Phone together if possible.
       Email takes full width.
    */

    .summary-contact-row {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .summary-contact-item:nth-child(3) {
        grid-column: 1 / -1;
    }


    /*
       Date and session stack because the
       available width is very small.
    */

    .summary-order-check {
        grid-template-columns: 1fr;
    }


    /*
       Normal rows stack.
    */

    .summary-detail-row {
        flex-direction: column;
        gap: 3px;
    }

    .summary-detail-value {
        max-width: 100%;
        text-align: left;
    }
}
