/* Food + E-Wallet top-up: 3-section payment breakdown */
.ftu-section {
    box-sizing: border-box;
    background: #fff;
    border: 1px solid #E8EAF0;
    border-radius: 12px;
    padding: 14px 16px;
    margin: 0 0 12px 0;
    width: 100%;
    max-width: 100%;
}

.ftu-section__header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.ftu-section__icon {
    display: inline-flex;
    /* Website theme Main color (Online sets --main-color on :root) */
    color: var(--main-color, #C4A35A);
    flex: 0 0 auto;
}

.ftu-section__icon svg {
    color: inherit;
}

.ftu-section__icon svg [stroke] {
    stroke: currentColor;
}

.ftu-section__title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #232A3E;
    margin: 0;
}

.ftu-section__rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ftu-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    font-size: 14px;
    line-height: 1.4;
    color: #232A3E;
}

.ftu-row__label {
    flex: 1 1 auto;
    text-align: left;
}

.ftu-row__sub {
    margin-top: 2px;
    font-size: 12px;
    color: #8B93A7;
    font-weight: 400;
}

.ftu-row__value {
    flex: 0 0 auto;
    text-align: right;
    white-space: nowrap;
}

.ftu-row__value--credit {
    color: #39B54A;
}

.ftu-row__value--bold {
    font-weight: 700;
}

.ftu-row--emphasis .ftu-row__label {
    font-weight: 600;
}

.ftu-row--divider {
    padding-top: 10px;
    margin-top: 4px;
    border-top: 1px solid #ECEEF4;
}

.ftu-row--payable .ftu-row__label,
.ftu-row--payable .ftu-row__value {
    font-weight: 700;
    color: var(--main-color, #C4A35A);
}

.ftu-row--grand .ftu-row__label,
.ftu-row--grand .ftu-row__value {
    font-weight: 700;
    color: #232A3E;
}

/* Outside payment card */
.ftu-remaining {
    margin: 0 0 12px 0;
    padding: 0 2px;
    font-size: 13px;
    color: #636A79;
    line-height: 1.4;
}

.ftu-remaining__amount {
    color: #39B54A;
    font-weight: 700;
}

/* Spacing for order-summary line items inside ftu-section--order */
.ftu-section--order .summary-price-item,
.summary-price__panel .ftu-section--order .summary-price-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
}

/* Keep amount on one line (e.g. "SGD 1.60") — label may wrap, value must not */
.ftu-section--order .summary-price-item .summary-price__title,
.summary-price__panel .ftu-section--order .summary-price-item .summary-price__title {
    flex: 1 1 auto;
    min-width: 0;
}

.ftu-section--order .summary-price-item .summary-price__content,
.ftu-section--order .summary-price-item .summary-price__price,
.summary-price__panel .ftu-section--order .summary-price-item .summary-price__content,
.summary-price__panel .ftu-section--order .summary-price-item .summary-price__price {
    flex: 0 0 auto;
    white-space: nowrap;
    text-align: right;
}

.ftu-section--order .ftu-row--grand {
    margin-top: 10px;
    padding-top: 12px;
}

/*
 * Cart footer collapse (#collapseOne / fa-angle-up):
 * Keep original absolute/sticky footer layout. When expanded, 3 FTU sections
 * slide up inside the cart footer only — scroll within max-height, never
 * overflow into Rewards / service tabs above.
 */
.cart-block #collapseOne.in,
.cart-block #collapseOne.in.isScroll,
.cart-block #collapseOne.isScroll {
    max-height: min(50vh, 380px);
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
}

/* Scroll lives on #collapseOne; panel keeps theme padding without escaping */
.cart-block #collapseOne .summary-price__panel {
    overflow: visible;
    max-height: none;
}

.cart-block #collapseOne .panel-body {
    overflow: visible;
}

.summary-price__panel .ftu-section,
.payment-summary .ftu-section {
    margin-left: 0;
    margin-right: 0;
}

.summary-price__panel .summary-price-list {
    gap: 0;
}

/* Remaining sits outside payment card */
.summary-price__panel > .ftu-remaining,
.payment-summary > .ftu-remaining {
    margin-top: 4px;
}
