/* Mate Delivery Method v1.3.0 | Clean, responsive, checkout-only styles */
.mate-delivery-picker {
    --mate-green: #146c4a;
    --mate-green-light: #eff8f3;
    --mate-text: #1f3029;
    --mate-muted: #69766f;
    width: 100%;
    clear: both;
    box-sizing: border-box;
    margin: 24px 0 30px;
    padding: clamp(18px, 2.8vw, 29px);
    border: 1px solid #e4ebe6;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 34px rgba(31, 51, 37, .045);
    color: var(--mate-text);
    font-family: inherit;
}
.mate-delivery-picker *, .mate-delivery-picker *::before, .mate-delivery-picker *::after {
    box-sizing: border-box;
}
.mate-delivery-head {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 20px;
}
.mate-delivery-head .mate-delivery-title-icon {
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: #e9f5ee;
    font-size: 23px;
}
.mate-delivery-head h3,
.woocommerce-checkout .mate-delivery-head h3 {
    margin: 0 0 3px !important;
    font-size: clamp(19px, 2vw, 23px) !important;
    line-height: 1.3 !important;
    color: var(--mate-text) !important;
    font-weight: 750;
}
.mate-delivery-head p,
.woocommerce-checkout .mate-delivery-head p {
    margin: 0;
    color: var(--mate-muted);
    font-size: 13px;
    line-height: 1.45;
}
.mate-delivery-one-choice {
    margin-left: auto;
    padding: 6px 11px;
    border: 1px solid #d9e8dd;
    border-radius: 999px;
    background: #f7faf8;
    color: #4f6d5c;
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
}
.mate-delivery-options { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.woocommerce-checkout .mate-delivery-card,
.mate-delivery-card {
    display: grid;
    position: relative;
    align-items: center;
    grid-template-columns: 24px 46px minmax(0, 1fr) auto;
    gap: 13px;
    min-height: 80px;
    margin: 0;
    padding: 13px 16px;
    border: 1.5px solid #e4eae5;
    border-radius: 15px;
    background: #fff;
    color: var(--mate-text);
    box-shadow: none;
    cursor: pointer;
    transition: background .17s, border-color .17s, box-shadow .17s, transform .17s;
}
.mate-delivery-card:hover {
    border-color: #8bbda4;
    background: #fbfefa;
    box-shadow: 0 3px 12px rgba(24, 76, 48, .06);
}
.woocommerce-checkout .mate-delivery-card.is-selected,
.mate-delivery-card.is-selected {
    border-color: var(--mate-green);
    background: var(--mate-green-light);
    box-shadow: 0 0 0 2px rgba(20, 108, 74, .06);
}
.mate-delivery-card input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    margin: 0 !important;
    display: block;
    padding: 0 !important;
    background: #fff;
    border: 2px solid #b8c7bf;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    outline-offset: 3px;
}
.mate-delivery-card input[type="radio"]:checked { border: 6px solid var(--mate-green); }
.mate-delivery-card input[type="radio"]:focus-visible { outline: 2px solid var(--mate-green); }
.mate-delivery-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    font-size: 23px;
    border-radius: 13px;
    background: #f4f6f4;
    line-height: 1;
}
.mate-delivery-card.is-selected .mate-delivery-icon { background: #dff0e6; }
.mate-delivery-card-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mate-delivery-card-copy strong {
    display: block;
    color: var(--mate-text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}
.mate-delivery-card-copy small {
    display: block;
    color: var(--mate-muted);
    font-size: 12px;
    line-height: 1.45;
    font-weight: 400;
}
.mate-delivery-trailing { display: flex; gap: 11px; align-items: center; justify-content: flex-end; }
.mate-delivery-price {
    color: #233d2b;
    font-size: 14px;
    white-space: nowrap;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}
.mate-delivery-price .woocommerce-Price-currencySymbol { font-size: .9em; }
.mate-delivery-price.is-free {
    color: var(--mate-green);
    background: #e3f1e8;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 11px;
    letter-spacing: .3px;
}
.mate-delivery-check {
    display: grid;
    place-items: center;
    width: 21px;
    height: 21px;
    border-radius: 50%;
    background: #dbe9de;
    color: transparent;
    font-size: 13px;
    font-weight: 900;
    transition: background .15s;
}
.mate-delivery-card.is-selected .mate-delivery-check { background: var(--mate-green); color: #fff; }
.mate-delivery-footnote,
.woocommerce-checkout .mate-delivery-footnote {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 14px 2px 0;
    font-size: 11.5px;
    color: var(--mate-muted);
    line-height: 1.5;
}
.mate-delivery-footnote::before { content: '✓'; color: var(--mate-green); font-weight: bold; }
/* Hide the duplicate native shipping selector only when the mirrored cards
   and real Woo shipping radios have both been discovered by checkout.js. */
body.mate-delivery-js .woocommerce-checkout-review-order-table tr.woocommerce-shipping-totals {
    display: none !important;
}
/* Avoid duplicate fee display when the enhancement script is unavailable. */
.woocommerce-checkout-review-order-table tr.mate-delivery-fee-row { display: none; }
body.mate-delivery-js .woocommerce-checkout-review-order-table tr.mate-delivery-fee-row { display: table-row; }
.woocommerce-checkout-review-order-table .mate-delivery-fee-row th,
.woocommerce-checkout-review-order-table .mate-delivery-fee-row td {
    padding-top: 13px;
    padding-bottom: 13px;
}
.woocommerce-checkout-review-order-table .mate-delivery-fee-row td {
    text-align: right;
    font-weight: 700;
}
.woocommerce-checkout-review-order-table .mate-delivery-fee-row td small {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    font-weight: 400;
    color: #728179;
    line-height: 1.35;
}
.woocommerce-checkout-review-order-table:not(.woocommerce-shipping-totals) .mate-native-rate-price { margin-left: 6px; }
/* Native Checkout Block radio cards. No custom JS; use WooCommerce Store API. */
.wc-block-checkout .wc-block-components-shipping-rates-control__package .wc-block-components-radio-control__option,
.wc-block-checkout .wc-block-components-shipping-rates-control .wc-block-components-radio-control__option {
    border: 1px solid #e0eae3;
    border-radius: 13px;
    margin: 0 0 9px;
    padding: 13px 14px;
    background: #fff;
    transition: border-color .15s, background .15s;
}
.wc-block-checkout .wc-block-components-shipping-rates-control__package .wc-block-components-radio-control__option:has(input:checked),
.wc-block-checkout .wc-block-components-shipping-rates-control .wc-block-components-radio-control__option:has(input:checked) {
    border-color: #146c4a;
    background: #eff8f3;
}
.wc-block-checkout .wc-block-components-shipping-rates-control .wc-block-components-radio-control__label {
    font-weight: 650;
}
@media (max-width: 640px) {
    .mate-delivery-picker { margin: 20px 0 24px; padding: 16px 13px; border-radius: 17px; }
    .mate-delivery-head { margin-bottom: 15px; gap: 9px; }
    .mate-delivery-head .mate-delivery-title-icon { width: 40px; height: 40px; flex-basis: 40px; border-radius: 12px; font-size: 20px; }
    .mate-delivery-one-choice { padding: 4px 8px; font-size: 10px; }
    .woocommerce-checkout .mate-delivery-card, .mate-delivery-card {
        grid-template-columns: 21px 38px minmax(0, 1fr);
        gap: 9px;
        min-height: 75px;
        padding: 12px 10px;
    }
    .mate-delivery-icon { width: 38px; height: 38px; border-radius: 11px; font-size: 20px; }
    .mate-delivery-card-copy strong { font-size: 12.8px; }
    .mate-delivery-card-copy small { font-size: 11px; }
    .mate-delivery-trailing { grid-column: 3 / 4; justify-content: space-between; padding-left: 0; margin-top: -4px; }
    .mate-delivery-check { width: 17px; height: 17px; font-size: 11px; }
    .mate-delivery-price { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
    .mate-delivery-card, .mate-delivery-check { transition: none; }
}

/* v1.3.0 — on-demand Google Maps area previews below each shipping option. */
.mate-delivery-option,
.mate-delivery-block-map { min-width: 0; }
.mate-delivery-map-tools {
    display: flex;
    align-items: center;
    margin: 3px 3px 3px 17px;
}
.mate-map-toggle,
.woocommerce-checkout button.mate-map-toggle,
.wc-block-checkout button.mate-map-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: auto;
    max-width: 100%;
    min-height: 32px;
    border: 0 !important;
    background: transparent !important;
    color: #146c4a !important;
    box-shadow: none !important;
    cursor: pointer;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 650;
    letter-spacing: 0;
    line-height: 1.5;
    padding: 4px 3px !important;
    text-align: left;
    text-decoration: underline;
    text-decoration-color: #b3d6bd;
    text-underline-offset: 3px;
    transition: color .15s;
}
.mate-map-toggle:hover,
.woocommerce-checkout button.mate-map-toggle:hover,
.wc-block-checkout button.mate-map-toggle:hover { color: #0d4a31 !important; }
.mate-map-toggle:focus-visible, .mate-map-place:focus-visible, .mate-map-open:focus-visible {
    outline: 2px solid #146c4a;
    outline-offset: 3px;
}
.mate-map-chevron { font-size: 17px; line-height: 1; transition: transform .2s; display: inline-block; }
.mate-map-toggle[aria-expanded="true"] .mate-map-chevron { transform: rotate(180deg); }
.mate-map-panel {
    margin: 7px 2px 10px;
    padding: 12px;
    border: 1px solid #dce8df;
    border-radius: 13px;
    background: #f8fbf8;
    color: #354940;
    min-width: 0;
}
.mate-map-panel[hidden] { display: none !important; }
.mate-map-switcher { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
/* 11 Hoi An locations: a single swipeable row avoids a tall mobile checkout. */
.mate-map-switcher.is-scrollable {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 6px;
    scroll-snap-type: x proximity;
}
.mate-map-switcher.is-scrollable .mate-map-place {
    flex: 0 0 auto;
    white-space: nowrap;
    scroll-snap-align: start;
}
.mate-map-swipe-hint {
    font-size: 11px;
    color: #65776a;
    margin: -1px 2px 9px;
    line-height: 1.5;
}

.mate-map-place,
.woocommerce-checkout button.mate-map-place,
.wc-block-checkout button.mate-map-place {
    display: inline-flex;
    border: 1px solid #d7e4d9 !important;
    border-radius: 999px !important;
    color: #3f564a !important;
    background: #fff !important;
    box-shadow: none !important;
    cursor: pointer;
    padding: 6px 11px !important;
    font-family: inherit;
    font-weight: 600;
    font-size: 11.5px;
    line-height: 1.4;
    text-transform: none;
    width: auto;
}
.mate-map-place.is-active,
.woocommerce-checkout button.mate-map-place.is-active,
.wc-block-checkout button.mate-map-place.is-active {
    background: #146c4a !important;
    color: #fff !important;
    border-color: #146c4a !important;
}
.mate-map-frame-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 10px;
    width: 100%;
    height: 240px;
    background: #e9eee9;
}
.mate-map-iframe { display: block; border: 0; width: 100%; height: 100%; }
.mate-map-bottom { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 9px; margin: 10px 1px 0; }
.mate-map-caption { font-size: 11px; line-height: 1.55; color: #65776a; flex: 1 1 190px; }
.mate-map-open,
.woocommerce-checkout a.mate-map-open,
.wc-block-checkout a.mate-map-open { font-size: 11.5px; color: #146c4a; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.mate-delivery-block-map { margin: -7px 8px 10px 14px; }
.mate-delivery-block-map .mate-delivery-map-tools { margin: 0 0 3px; }
.mate-delivery-block-map .mate-map-panel { margin-top: 4px; }
@media (max-width: 640px) {
    .mate-delivery-map-tools { margin-left: 11px; }
    .mate-map-toggle,
    .woocommerce-checkout button.mate-map-toggle,
    .wc-block-checkout button.mate-map-toggle { font-size: 11.8px; }
    .mate-map-panel { padding: 9px; }
    .mate-map-frame-wrap { height: 210px; }
    .mate-delivery-block-map { margin-left: 9px; margin-right: 7px; }
}

/* Coupon restriction: shown directly beneath the dine-in selection. */
.mate-delivery-coupon-policy {
    display: flex;
    align-items: center;
    margin: 7px 9px 9px 14px !important;
    padding: 8px 10px;
    border-radius: 9px;
    border: 1px solid #ebdfc8;
    background: #fffaf0;
    color: #755728;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.55;
}
.mate-delivery-coupon-policy::before {
    content: 'ⓘ';
    flex: none;
    font-weight: bold;
    font-size: 15px;
    margin-right: 7px;
}
.mate-delivery-block-map .mate-delivery-coupon-policy {
    margin: 8px 0 10px !important;
}
