/*
    "יש לי הטבה/קופון" benefit rows, iOS style (as the 1033 register form), SRFT-1034.
    views/checkout/_benefit_rows.php. Site palette only:
    #243D44 #545F64 #D3D8DA #ECECEC #F7F7F7 + #99DCDC #F6ABAA.
    The popup's own card rules (inline in _coupon_in_cart.php, checkout.css) are strong,
    so the row rules below are pinned.
-------------------------------------------------------------- */

/* the popup: grey sheet, round ✕, the icon and title as before */
.coupon-modal-overlay .coupon-modal.ios-modal {background: #F7F7F7; border-radius: 14px; padding: 18px 16px 20px; width: 440px; max-width: 94vw; text-align: right; color: #243D44;}
.coupon-modal.ios-modal .ios-grab {display: none;}
.coupon-modal-overlay .coupon-modal.ios-modal .coupon-modal-close {top: 12px; left: 12px; width: 30px; height: 30px; border-radius: 15px; background: #ECECEC; color: #545F64; font-size: 15px; line-height: 30px; text-align: center;}
.coupon-modal-overlay .coupon-modal.ios-modal .coupon-modal-icon {margin: 4px 0 6px; text-align: center;}
.coupon-modal-overlay .coupon-modal.ios-modal .coupon-modal-icon img {height: 44px;}
.coupon-modal.ios-modal .coupon-modal-title {font-size: 22px; margin: 0 0 2px; text-align: center;}
.coupon-modal.ios-modal .coupon-modal-subtitle {font-size: 15px; color: #545F64; margin: 0 0 14px; text-align: center;}

/* phones: a bottom sheet, like the product picker */
@media (max-width: 899px) {
    /* the site's phone rules make the popup full height: pin it to the bottom */
    .coupon-modal-overlay .coupon-modal.ios-modal {position: absolute !important; left: 0 !important; right: 0 !important; bottom: 0 !important; top: auto !important;
        height: auto !important; min-height: 0 !important; margin: 0 !important;
        width: 100%; max-width: 100%; max-height: 88vh !important; border-radius: 14px 14px 0 0;
        padding: 8px 16px calc(20px + env(safe-area-inset-bottom)); animation: ios-sheet-up .38s cubic-bezier(.32,.72,0,1);}
    .coupon-modal.ios-modal .ios-grab {display: block; width: 36px; height: 5px; border-radius: 3px; background: #D3D8DA; margin: 0 auto 8px;}
    .coupon-modal-overlay .coupon-modal.ios-modal .coupon-modal-close {top: 18px;}
}
@keyframes ios-sheet-up {from {transform: translateY(100%);} to {transform: translateY(0);}}

/* the grouped rows */
.ios-group {background: #fff; border-radius: 12px; overflow: hidden; direction: rtl; text-align: right;}
.ios-group .coupon-card.ios-row {margin: 0 !important; border: 0 !important; border-radius: 0 !important; overflow: visible; background: #fff;}
.ios-group .coupon-card.ios-row + .coupon-card.ios-row {border-top: 1px solid #ECECEC !important;}
.ios-group .coupon-card-header.ios-row-head {display: flex !important; align-items: center; justify-content: flex-start !important; gap: 12px; min-height: 60px; padding: 10px 14px !important;
    cursor: pointer; -webkit-tap-highlight-color: transparent;}
.ios-group .ios-row-head:active {background: #F7F7F7;}
.ios-group .ios-row-head:focus-visible {outline: 2px solid #99DCDC; outline-offset: -2px;}
.ios-group .ios-logos {flex: none; display: flex; align-items: center; width: 88px;}
.ios-group .ios-logo {flex: none; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; background: #fff; box-shadow: 0 0 0 2px #fff, 0 0 0 3px #ECECEC;
    display: inline-flex; align-items: center; justify-content: center;}
.ios-group .ios-logo + .ios-logo {margin-right: -6px;}
.ios-group .ios-logo img {width: 100% !important; height: 100% !important; max-width: none; object-fit: contain;}
.ios-group .ios-logo--icon {background: #F7F7F7;}
.ios-group .ios-logo--icon svg {width: 20px; height: auto;}
.ios-group .ios-logo--wide {width: 72px; height: 36px; border-radius: 0; box-shadow: none;}
.ios-group .ios-title {flex: 1 1 auto; min-width: 0; font-size: 17px; line-height: 1.25; color: #243D44;}
.ios-group .ios-chev {flex: none; display: inline-flex; transition: transform .2s;}
.ios-group .coupon-card.active .ios-chev {transform: rotate(-90deg);}

/* inside a row: label and field on one line, hairline, helper, error, pill button */
.ios-group .coupon-card-body.ios-row-body {padding: 0 14px 16px !important;}
.ios-group .coupon-input-group.ios-inner {display: block !important; height: auto !important; overflow: visible !important; border: 0 !important; padding: 0 !important; background: none !important;}
.ios-group .ios-field {display: flex; align-items: center; gap: 12px; height: 48px; border-bottom: 1px solid #D3D8DA;}
.ios-group .ios-field:focus-within {border-bottom: 2px solid #99DCDC;}
.ios-group .ios-inner.error .ios-field {border-bottom: 2px solid #F6ABAA;}
.ios-group .ios-field label {flex: none; margin: 0; color: #243D44; font-size: 17px; font-weight: 400;}
.ios-group .ios-field input.coupon-input-field {flex: 1 1 auto; min-width: 0; height: 46px; padding: 0 !important; border: 0 !important; border-radius: 0 !important;
    background: transparent !important; box-shadow: none !important; outline: none; color: #243D44; font-size: 17px !important; text-align: right;}
.ios-group .ios-help {margin-top: 8px; font-size: 14px; line-height: 1.35; color: #545F64;}
.ios-group .coupon-input-message {margin-top: 8px; padding: 0; font-size: 14px;}
.ios-group .coupon-input-message:empty {display: none;}
.ios-group .coupon-input-message .error {display: flex; align-items: center; gap: 6px; color: red;}
.ios-group .coupon-input-message .error img {width: 16px;}
.ios-group .btn-redeem.ios-btn {display: block; width: 100%; height: 48px; margin-top: 14px; padding: 0; border: 0; border-radius: 30px; background: #243D44; color: #fff;
    font-size: 18px; font-weight: 700; opacity: 1;}
.ios-group .btn-redeem.ios-btn:disabled {background: #D3D8DA; color: #545F64; opacity: 1;}
