/**
 * My basket — dedicated screen + hub addon rows; item lines match custom veggies bh-card rows.
 * Scoped to main.shop-other-page.mb-my-basket.mb-my-basket--hub and body.mb-basket-page
 */

main.shop-other-page.mb-my-basket.mb-my-basket--hub {
    display: flex;
    flex-direction: column;
    gap: var(--kf-app-gutter, 5px);
    min-width: 0;
    padding-bottom: calc(28px + env(safe-area-inset-bottom, 0));
    font-family: var(--kf-app-font-family, inherit);
    font-size: var(--kf-app-fs-body);
}

/* Hub title/subtitle removed — optional delivery strip + module only */
.mb-my-basket--hub .mh-basket-hub--no-toolbar .mh-basket-hub__zone--basket {
    padding-top: 10px;
}

body.mh-page main.mb-my-basket--hub .shop-hub-delivery__text {
    margin: 0 auto;
    max-width: 22rem;
    font-family: var(--kf-app-font-family, inherit);
    font-size: calc(var(--kf-app-fs-small) * 1.05);
    font-weight: 400;
    line-height: 1.45;
    color: var(--mh-muted, #64748b);
    text-align: center;
}

body.mh-page main.mb-my-basket--hub .shop-hub-delivery__text strong {
    font-weight: 400;
    color: var(--mh-ink, #0c1222);
}

/* 2-up grid — veggies box + shop lines share the same two-column layout */
.mb-my-basket--hub .mh-home-basket-module .bh-grid.mb-basket-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--kf-app-gutter);
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.mb-my-basket--hub .bh-card__name,
.mb-my-basket--hub .bh-card__qtytext {
    font-weight: 400;
}

.mb-basket-card-link--row {
    display: block;
    margin: 0;
    padding: 0;
    text-decoration: none;
    color: inherit;
    border-radius: var(--bh-radius-md);
    min-height: 0;
}

.mb-basket-card-link--row:focus-visible {
    outline: none;
}

.mb-basket-card-link--row:focus-visible .bh-card {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

/* Read-only addon row: meta + qty pill */
.mb-my-basket--hub .mb-basket-card--addon .bh-card__body {
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.mb-basket-card__qty-pill {
    flex: 0 0 auto;
    margin: 0;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: var(--kf-app-fs-small);
    font-weight: 400;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    color: var(--kf-cta-ink, #3f2d22);
    background: #f2d8c4;
    border: 1px solid color-mix(in srgb, var(--kf-cta-mid, #e8c9ae) 65%, rgba(15, 23, 42, 0.12));
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset;
}

/* Veggies row: title + tiny “Customize” chip (card is the link) */
.mb-my-basket--hub .mb-basket-card--veggies .bh-card__body {
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}

.mb-my-basket--hub .mb-basket-card--veggies .mb-basket-card__customize {
    flex: 0 0 auto;
    margin: 0;
    padding: 1px 5px;
    font-size: 0.5rem;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: 0.02em;
    color: #166534;
    background: rgba(236, 253, 245, 0.95);
    border: 1px solid rgba(52, 211, 153, 0.45);
    border-radius: 4px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
    white-space: nowrap;
    pointer-events: none;
}

/* Veggies hero thumb — slightly larger visual in line */
.mb-my-basket--hub .mb-basket-card--veggies .bh-card__media.mb-basket-card__media--veggies {
    background: #ecfdf5;
}

.mb-my-basket--hub .mb-basket-card--veggies .bh-card__media.mb-basket-card__media--veggies img {
    object-fit: contain;
    padding: 6px;
    box-sizing: border-box;
}

.mb-basket-card__pending-tag {
    display: inline-block;
    margin-inline-start: 0.35rem;
    padding: 2px 7px;
    font-size: calc(var(--kf-app-fs-small) * 0.88);
    font-weight: 400;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #9a3412;
    background: rgba(254, 243, 199, 0.95);
    border: 1px solid rgba(251, 191, 36, 0.55);
    border-radius: 999px;
    vertical-align: 0.08em;
}

.mb-basket-card.mb-basket-card--pending {
    border-color: rgba(251, 191, 36, 0.55);
    box-shadow:
        0 2px 10px rgba(15, 23, 42, 0.05),
        0 0 0 1px rgba(254, 243, 199, 0.45) inset;
}

.mb-basket-empty {
    margin: 0;
    padding: 18px 14px;
    font-size: var(--kf-app-fs-body);
    font-weight: 400;
    line-height: 1.55;
    text-align: center;
    color: var(--shop-muted, #64748b);
    border: 1px dashed rgba(148, 163, 184, 0.45);
    border-radius: var(--bh-radius-md);
    background: rgba(248, 250, 252, 0.85);
}

/* Footer CTA — same control as My Home “View Your Basket” (mh-greet__harvest-cta in customer-app.css) */
.mb-basket-foot-actions {
    margin: 10px var(--kf-app-gutter, 5px) 0;
    padding-bottom: 4px;
}

.mb-my-basket--hub .mb-basket-foot-actions--shop-more .mh-greet__harvest-cta-wrap {
    width: 100%;
    margin-top: 12px;
}

@supports not (color: color-mix(in srgb, red, blue)) {
    .mb-basket-card__qty-pill {
        border: 1px solid rgba(222, 185, 154, 0.85);
    }
}

/* Portal chrome — regular weight on this page only (match /shop, /veggies-basket); tab bar: customer-login-bottom-nav.css */
body.mh-page:has(main.mb-my-basket--hub) .kph-hero__eyebrow,
body.mh-page:has(main.mb-my-basket--hub) .kph-hero__tag,
body.mh-page:has(main.mb-my-basket--hub) .kph-wallet__amt,
body.mh-page:has(main.mb-my-basket--hub) .kph-wallet-tip__text,
body.mh-page:has(main.mb-my-basket--hub) .kph-wallet-tip__link {
    font-weight: 400;
}

/* Weekly basket — single flat screen (no nested hub cards) */
body.mb-basket-page main.mb-my-basket-main {
    display: block;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    padding: 0 0 calc(12px + env(safe-area-inset-bottom, 0));
    padding-inline: 0;
    background: #f4f7f5;
}

.mb-basket-screen {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 10px 0 16px;
    box-sizing: border-box;
}

.mb-basket-screen__head {
    padding: 4px 14px 14px;
    text-align: center;
}

.mb-basket-screen__back {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #047857;
    text-decoration: none;
}

.mb-basket-screen__title {
    margin: 0 0 4px;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.mb-basket-screen__sub {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
}

.mb-basket-screen__empty {
    margin: 24px 14px;
    padding: 20px 12px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
}

.mb-basket-screen__total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 12px 10px;
    padding: 12px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #047857;
    background: #f8fffb;
    border: 1px solid rgba(110, 231, 183, 0.55);
    border-radius: var(--bh-radius-lg, 16px);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.8) inset,
        0 8px 22px rgba(15, 23, 42, 0.06);
}

.mb-basket-screen__total strong {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-transform: none;
    color: #0f172a;
}

.mb-basket-screen__pay {
    margin: 0 12px 12px;
    padding: 10px 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--bh-radius-md, 12px);
    background: #fff;
}

.mb-basket-screen__list {
    width: 100%;
    max-width: 100%;
    padding: 0 0 8px;
    box-sizing: border-box;
}

/* Section panels — same sleek row list as custom veggies selection */
body.mb-basket-page .mb-basket-section {
    margin: 0;
    padding: 0 12px 12px;
    min-width: 0;
}

body.mb-basket-page .mb-basket-section + .mb-basket-section {
    padding-top: 0;
}

body.mb-basket-page .mb-basket-panel.bh-custom-panel {
    margin: 0;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: var(--bh-radius-lg, 16px);
    background: #fff;
    box-shadow: var(--bh-shadow, 0 2px 12px rgba(15, 23, 42, 0.06));
    overflow: hidden;
}

body.mb-basket-page .mb-basket-panel .bh-subcategory-band {
    margin: 0;
    padding: 12px 12px 10px;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid rgba(160, 110, 65, 0.28);
    background: #f0e2d4;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

body.mb-basket-page .mb-basket-panel .bh-subcategory-band__name {
    color: #5c3d2e;
}

body.mb-basket-page .mb-basket-grid.bh-grid.bh-grid--lines {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    grid-template-columns: unset;
}

body.mb-basket-page .mb-basket-grid > li {
    margin: 0;
    padding: 0;
    list-style: none;
    min-width: 0;
}

body.mb-basket-page .mb-basket-card.bh-card {
    margin: 0;
    border: none;
    border-bottom: 1px solid rgba(16, 185, 129, 0.12);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.55);
    box-shadow: none;
    transition: background 0.15s ease;
}

body.mb-basket-page .mb-basket-grid > li:last-child .mb-basket-card.bh-card {
    border-bottom: none;
}

body.mb-basket-page .mb-basket-card.bh-card:hover {
    box-shadow: none;
    background: rgba(255, 255, 255, 0.92);
}

body.mb-basket-page .mb-basket-card .bh-card__body {
    padding: 6px 10px 6px 6px;
}

body.mb-basket-page .mb-basket-card .bh-card__name {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.3;
}

body.mb-basket-page .mb-basket-card .bh-card__qtytext {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
}

body.mb-basket-page .mb-basket-card__ph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 1.15rem;
    line-height: 1;
}

body.mb-basket-page .mb-basket-card__pay {
    display: inline-block;
    margin: 0;
    padding: 2px 7px;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1.25;
    border-radius: 999px;
    vertical-align: middle;
}

body.mb-basket-page .mb-basket-card__pay--paid {
    color: #047857;
    background: rgba(16, 185, 129, 0.14);
}

body.mb-basket-page .mb-basket-card__pay--pending_cod {
    color: #b45309;
    background: rgba(245, 158, 11, 0.16);
}

@media (hover: hover) and (pointer: fine) {
    .mb-basket-screen__back:hover {
        color: #065f46;
    }
}
