/* ============================================================
   Donation flow styles — modal, cart offcanvas, checkout
   Built on the existing palette in variables.css:
   --color-primary: #F68962 (orange/coral, the "mowaddah" brand)
   --color-secondary: #292929
   ============================================================ */

:root {
    --mw-cart-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* ---------- Utility ---------- */
.text-mowaddah { color: var(--color-primary) !important; }
.bg-mowaddah { background-color: var(--color-primary) !important; color: #fff; }

.btn-mowaddah-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
}
.btn-mowaddah-link:hover { color: var(--color-primary); text-decoration: underline; }

/* ---------- Reusable donation buttons (work without resources/css/app.css) ---------- */
.donation-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.2;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    border: 1px solid transparent;
    background: transparent;
    color: var(--color-secondary, #292929);
}
.donation-btn-primary {
    background: var(--color-primary, #f68962);
    color: #fff;
    border-color: var(--color-primary, #f68962);
    box-shadow: 0 4px 12px rgba(246, 137, 98, 0.2);
}
.donation-btn-primary:hover {
    background: #e67a55;
    border-color: #e67a55;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(246, 137, 98, 0.3);
}
.donation-btn-primary:disabled,
.donation-btn-primary.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}
.donation-btn-soft {
    background: rgba(246, 137, 98, 0.06);
    color: var(--color-primary, #f68962);
    border: 1px solid rgba(246, 137, 98, 0.28);
}
.donation-btn-soft:hover {
    background: rgba(246, 137, 98, 0.12);
    border-color: rgba(246, 137, 98, 0.45);
    color: #e67a55;
}
.donation-btn-ghost {
    color: var(--color-text-dark-light, rgba(41, 41, 41, 0.66));
    background: transparent;
}
.donation-btn-ghost:hover {
    color: var(--color-primary, #f68962);
}
.donation-btn--block {
    width: 100%;
}

/* ---------- Header cart pill (uses .glass-btn-2 base, narrower) ---------- */
.header-cart-pill {
    padding: 12px 18px !important;
    gap: 6px !important;
}
.header-cart-pill i {
    font-size: 14px;
}
.header-cart-pill__count {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    min-width: 14px;
    text-align: center;
}

/* ---------- Header cart circle button ---------- */
.header-cart-circle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
.header-cart-circle:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: scale(1.08);
}
.header-cart-circle__badge {
    position: absolute;
    top: -4px;
    inset-inline-end: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: #e63946;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

/* ---------- Inline donation on each project card ---------- */
.donation-card-inline {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.donation-card-inline__amounts {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.donation-card-inline__amount-btn {
    flex: 0 0 auto;
    min-width: 56px;
    padding: 8px 12px;
    background: rgba(246, 137, 98, 0.06);
    color: #f68962;
    border: 1px solid rgba(246, 137, 98, 0.28);
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.donation-card-inline__amount-btn:hover {
    background: rgba(246, 137, 98, 0.12);
    border-color: rgba(246, 137, 98, 0.45);
}
.donation-card-inline__amount-btn.is-active {
    background: #f68962;
    color: #fff;
    border-color: #f68962;
    box-shadow: 0 4px 12px rgba(246, 137, 98, 0.25);
}

.donation-card-inline__custom {
    flex: 1;
    min-width: 130px;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid rgba(246, 137, 98, 0.28);
    border-radius: 10px;
    padding: 0 12px;
    transition: all 0.2s ease;
}
.donation-card-inline__custom:focus-within {
    border-color: #f68962;
    box-shadow: 0 0 0 3px rgba(246, 137, 98, 0.15);
}
.donation-card-inline__amount-input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 8px 0;
    font-weight: 700;
    font-size: 14px;
    color: var(--color-secondary, #292929);
    min-width: 0;
}
.donation-card-inline__amount-input.is-error {
    color: #dc3545;
}
.donation-card-inline__amount-input.is-error::placeholder {
    color: rgba(220, 53, 69, 0.7);
}
.donation-card-inline__currency {
    font-size: 12px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.45);
    margin-inline-start: 4px;
}

.donation-card-inline__actions {
    display: flex;
    align-items: stretch;
    gap: 6px;
}
.donation-card-inline__donate-btn {
    flex: 1;
    padding: 12px 16px;
    background: #f68962;
    color: #fff;
    border: 0;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.donation-card-inline__donate-btn:hover:not(:disabled) {
    background: #e67a55;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(246, 137, 98, 0.3);
}
.donation-card-inline__donate-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.donation-card-inline__icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    flex: 0 0 44px;
    padding: 10px;
    background: rgba(246, 137, 98, 0.06);
    color: #f68962;
    border: 1px solid rgba(246, 137, 98, 0.28);
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
}
.donation-card-inline__icon-btn:hover:not(:disabled) {
    background: rgba(246, 137, 98, 0.12);
    border-color: rgba(246, 137, 98, 0.45);
    color: #e67a55;
}
.donation-card-inline__icon-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ---------- Topbar cart icon (kept for unused topbar.blade) ---------- */
.topbar-cart-btn {
    color: var(--color-secondary);
    line-height: 1;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all .2s ease;
}
.topbar-cart-btn:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.cart-badge {
    font-size: .65rem;
    padding: .25rem .4rem;
    min-width: 18px;
}

/* ============================================================
   Donation modal v2 — clean redesign matching bazl reference.
   Used by recurringDonationModal + giftDonationModal.
   ============================================================ */
.donation-modal-v2 .modal-content {
    border: 0;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
}
.donation-modal-v2__header {
    background: linear-gradient(135deg, #fff7f3 0%, #ffece1 100%);
    padding: 28px 28px 20px;
    text-align: center;
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}
.donation-modal-v2__header .btn-close {
    position: absolute;
    top: 14px;
    inset-inline-end: 14px;
    padding: 6px;
}
.donation-modal-v2__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    background: #fff;
    color: var(--color-primary, #f68962);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 6px 20px rgba(246, 137, 98, 0.18);
}
.donation-modal-v2__icon--gift {
    color: #d6336c;
    box-shadow: 0 6px 20px rgba(214, 51, 108, 0.18);
}
.donation-modal-v2__title {
    margin: 0 0 4px;
    font-weight: 800;
    color: var(--color-secondary, #292929);
    font-size: 22px;
}
.donation-modal-v2__subtitle {
    color: var(--color-text-dark-light, rgba(41, 41, 41, 0.66));
    margin: 0;
    font-size: 14px;
}
.donation-modal-v2__body {
    padding: 24px 28px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}
.donation-modal-v2__project {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fafafa;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
}
.donation-modal-v2__project-img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    background: #fff;
}
.donation-modal-v2__project-label {
    color: var(--color-text-dark-light, rgba(41, 41, 41, 0.66));
    font-size: 12px;
}

.donation-field {
    margin-bottom: 18px;
}
.donation-field__label {
    display: block;
    color: var(--color-secondary, #292929);
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 8px;
}
.donation-field__hint {
    margin: 6px 0 0;
    color: var(--color-text-dark-light, rgba(41, 41, 41, 0.66));
    font-size: 12px;
}

/* Amount preset pills */
.amount-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.amount-pill {
    flex: 1 0 auto;
    min-width: 80px;
    padding: 10px 12px;
    background: rgba(246, 137, 98, 0.06);
    color: var(--color-primary, #f68962);
    border: 1.5px solid rgba(246, 137, 98, 0.22);
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.amount-pill:hover {
    background: rgba(246, 137, 98, 0.12);
    border-color: rgba(246, 137, 98, 0.4);
}
.amount-pill--active,
.amount-pill.is-active {
    background: var(--color-primary, #f68962);
    color: #fff;
    border-color: var(--color-primary, #f68962);
    box-shadow: 0 4px 14px rgba(246, 137, 98, 0.28);
}
.amount-pill__cur {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.7;
    margin-inline-start: 2px;
}

/* Frequency / iteration pills (radios styled as pills) */
.option-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.option-pill {
    flex: 1 0 auto;
    min-width: 100px;
    padding: 10px 14px;
    background: #fff;
    color: var(--color-secondary, #292929);
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    margin: 0;
}
.option-pill input { display: none; }
.option-pill:hover {
    border-color: rgba(246, 137, 98, 0.4);
    color: var(--color-primary, #f68962);
}
.option-pill--active {
    background: var(--color-primary, #f68962);
    color: #fff;
    border-color: var(--color-primary, #f68962);
    box-shadow: 0 4px 14px rgba(246, 137, 98, 0.28);
}
.option-pill--active:hover { color: #fff; }

/* Input wrap with prefix/suffix */
.input-wrap {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    padding: 0 14px;
    transition: all 0.2s ease;
}
.input-wrap:focus-within {
    border-color: var(--color-primary, #f68962);
    box-shadow: 0 0 0 3px rgba(246, 137, 98, 0.12);
}
.input-wrap__field {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 10px 0;
    font-weight: 600;
    color: var(--color-secondary, #292929);
}
.input-wrap__prefix,
.input-wrap__suffix {
    color: rgba(0, 0, 0, 0.5);
    font-size: 13px;
    font-weight: 600;
}
.input-wrap__field::-webkit-outer-spin-button,
.input-wrap__field::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.input-wrap__field[type=number] { -moz-appearance: textfield; }

/* Delivery method (email / SMS) — like option-pill but with icon */
.delivery-methods {
    display: flex;
    gap: 10px;
}
.delivery-method {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #fff;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0;
}
.delivery-method input { display: none; }
.delivery-method__icon {
    width: 36px;
    height: 36px;
    background: rgba(246, 137, 98, 0.08);
    color: var(--color-primary, #f68962);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: all 0.2s ease;
}
.delivery-method__text {
    font-weight: 600;
    font-size: 14px;
    color: var(--color-secondary, #292929);
}
.delivery-method--active {
    border-color: var(--color-primary, #f68962);
    background: rgba(246, 137, 98, 0.04);
}
.delivery-method--active .delivery-method__icon {
    background: var(--color-primary, #f68962);
    color: #fff;
}

/* Gift message templates */
.gift-templates {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
.gift-templates__loading {
    text-align: center;
    color: rgba(0, 0, 0, 0.4);
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
}
.gift-template {
    text-align: start;
    padding: 12px 16px;
    background: #fff;
    color: var(--color-secondary, #292929);
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}
.gift-template:hover { border-color: rgba(246, 137, 98, 0.4); }
.gift-template--active {
    border-color: var(--color-primary, #f68962);
    background: rgba(246, 137, 98, 0.04);
}
.gift-template__check {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
    width: 22px;
    height: 22px;
    background: var(--color-primary, #f68962);
    color: #fff;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}
.gift-template--active .gift-template__check { display: inline-flex; }
.gift-template__text {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--color-text-dark-light, rgba(41, 41, 41, 0.85));
}

.donation-modal-v2__consent {
    background: #fafafa;
    padding: 12px;
    border-radius: 10px;
    margin: 8px 0 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.donation-modal-v2__consent input { margin-top: 3px; }
.donation-modal-v2__submit {
    padding: 14px !important;
    font-size: 16px !important;
}

/* ---------- Old donation modal (still in code for compat) ---------- */
.donation-modal .modal-content {
    border-radius: 16px;
    border: none;
    overflow: hidden;
}
.donation-modal .modal-title {
    color: var(--color-secondary);
    font-weight: 700;
}
.donation-modal__project {
    background: #fafafa;
    border-radius: 12px;
    padding: .75rem 1rem;
}
.donation-modal__tabs .nav-link {
    color: var(--color-text-dark-light, rgba(41, 41, 41, .66));
    background: transparent;
    border-radius: 10px;
    font-weight: 600;
    border: 1px solid transparent;
    transition: all .2s ease;
}
.donation-modal__tabs .nav-link.active {
    color: #fff;
    background: var(--color-primary);
    box-shadow: 0 4px 12px rgba(246, 137, 98, 0.25);
}
.donation-modal__tabs .nav-link:not(.active):hover {
    background: rgba(246, 137, 98, 0.08);
    color: var(--color-primary);
}
.donation-modal__amount {
    font-size: 1.1rem;
    font-weight: 600;
}

/* ---------- Project-card actions ---------- */
.project-card-actions .btn { font-weight: 600; }
.project-card-actions .project-view-details {
    color: var(--color-text-dark-light, #555);
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: .5rem .75rem;
    transition: all .2s ease;
}
.project-card-actions .project-view-details:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

/* ---------- Donation amount chips (kept for future use) ---------- */
.donation-amount-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
}
.donation-amount-chip {
    border: 2px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    color: var(--color-secondary);
    border-radius: 12px;
    padding: .75rem .5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
}
.donation-amount-chip:hover,
.donation-amount-chip.is-active {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgba(246, 137, 98, 0.06);
}
.donation-amount-chip .amount-currency {
    font-size: .75rem;
    opacity: .65;
    margin-top: .15rem;
}

/* ---------- Cart offcanvas (clean redesign) ---------- */
.cart-offcanvas {
    width: 400px;
    box-shadow: var(--mw-cart-shadow);
}
.cart-offcanvas .offcanvas-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 20px 24px;
}
.cart-offcanvas .offcanvas-title {
    color: var(--color-secondary, #292929);
    font-weight: 800;
    font-size: 17px;
}
.cart-offcanvas__count {
    background: rgba(246, 137, 98, 0.1);
    color: var(--color-primary, #f68962);
    font-size: 12px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 999px;
    margin-inline-start: 4px;
}
.cart-offcanvas .offcanvas-body {
    padding: 8px 16px;
}
.cart-offcanvas__empty {
    text-align: center;
    padding: 60px 20px;
}
.cart-offcanvas__empty-icon {
    font-size: 56px;
    color: rgba(0, 0, 0, 0.12);
    margin-bottom: 12px;
}
.cart-offcanvas__empty-text {
    color: var(--color-text-dark-light, rgba(41, 41, 41, 0.66));
    margin: 0;
}
.cart-offcanvas__header-text {
    display: flex;
    align-items: center;
    gap: 8px;
}
.cart-offcanvas__header-icon {
    color: var(--color-primary, #f68962);
    font-size: 18px;
}
.cart-offcanvas__item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    align-items: flex-start;
}
.cart-offcanvas__item:last-child {
    border-bottom: 0;
}
.cart-offcanvas__item:first-child {
    padding-top: 4px;
}
.cart-offcanvas__item-img {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    background: #fafafa;
}
.cart-offcanvas__item-body {
    flex: 1;
    min-width: 0;
}
.cart-offcanvas__item-title {
    display: block;
    color: var(--color-secondary, #292929);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
}
.cart-offcanvas__item-amount-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.cart-offcanvas__amount-btn {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(246, 137, 98, 0.08);
    color: var(--color-primary, #f68962);
    border: 1px solid rgba(246, 137, 98, 0.2);
    border-radius: 8px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}
.cart-offcanvas__amount-btn:hover {
    background: rgba(246, 137, 98, 0.18);
    border-color: rgba(246, 137, 98, 0.4);
}
.cart-offcanvas__amount-input-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 2px 10px;
    transition: all 0.2s ease;
}
.cart-offcanvas__amount-input-wrap:focus-within {
    border-color: var(--color-primary, #f68962);
    box-shadow: 0 0 0 3px rgba(246, 137, 98, 0.12);
}
.cart-offcanvas__amount-input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 4px 0;
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    color: var(--color-primary, #f68962);
}
/* Remove number-input spinners */
.cart-offcanvas__amount-input::-webkit-outer-spin-button,
.cart-offcanvas__amount-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.cart-offcanvas__amount-input[type=number] {
    -moz-appearance: textfield;
}
.cart-offcanvas__amount-currency {
    color: rgba(0, 0, 0, 0.4);
    font-size: 11px;
    font-weight: 600;
    margin-inline-start: 2px;
}
.cart-offcanvas__item-remove {
    flex-shrink: 0;
    background: transparent;
    border: 0;
    color: rgba(220, 53, 69, 0.6);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 6px;
    transition: all 0.2s;
    font-size: 12px;
    align-self: flex-start;
}
.cart-offcanvas__item-remove:hover {
    background: rgba(220, 53, 69, 0.08);
    color: #dc3545;
}
.cart-offcanvas__footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: #fafafa;
}
.cart-offcanvas__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.cart-offcanvas__total-label {
    color: var(--color-secondary, #292929);
    font-weight: 700;
    font-size: 15px;
}
.cart-offcanvas__total-value {
    color: var(--color-primary, #f68962);
    font-weight: 800;
    font-size: 20px;
}

/* ---------- Checkout page (clean redesign) ---------- */
.checkout-page {
    background: #fafafa;
    padding: 48px 0 80px;
    min-height: 60vh;
}
.checkout-page__header {
    text-align: center;
    margin-bottom: 32px;
}
.checkout-page__title {
    color: var(--color-secondary);
    font-weight: 800;
    margin-bottom: 4px;
}
.checkout-page__subtitle {
    color: var(--color-text-dark-light, rgba(41, 41, 41, 0.66));
    margin: 0;
}

.checkout-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
}
.checkout-card__title {
    color: var(--color-secondary);
    font-weight: 700;
    font-size: 18px;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.checkout-card__count {
    background: rgba(246, 137, 98, 0.1);
    color: var(--color-primary);
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 13px;
    font-weight: 700;
}

.checkout-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.checkout-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}
.checkout-item:first-child {
    padding-top: 0;
}
.checkout-item__img {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}
.checkout-item__body {
    flex: 1;
    min-width: 0;
}
.checkout-item__title {
    color: var(--color-secondary);
    font-weight: 600;
    font-size: 15px;
    margin: 0 0 4px;
    line-height: 1.3;
}
.checkout-item__message {
    color: var(--color-text-dark-light, rgba(41, 41, 41, 0.66));
    font-size: 13px;
    margin: 0;
}
.checkout-item__amount {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 17px;
    text-align: end;
}
.checkout-item__remove {
    background: transparent;
    border: 0;
    color: #dc3545;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: background 0.2s;
    font-size: 14px;
}
.checkout-item__remove:hover {
    background: rgba(220, 53, 69, 0.08);
}

.checkout-summary {
    position: sticky;
    top: 16px;
}
.checkout-summary__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    color: var(--color-text-dark-light, rgba(41, 41, 41, 0.66));
}
.checkout-summary__row--total {
    padding-top: 16px;
    margin-top: 8px;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
    color: var(--color-secondary);
}
.checkout-summary__total-label {
    font-weight: 700;
    font-size: 16px;
}
.checkout-summary__total-amount {
    color: var(--color-primary);
    font-weight: 800;
    font-size: 22px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
}
.checkout-summary__total-amount .tticon-sar {
    font-size: 18px;
    line-height: 1;
    position: relative;
    top: 1px;
}

.checkout-payment {
    margin: 20px 0;
}
.checkout-payment__option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fafafa;
}
.checkout-payment__option input { display: none; }
.checkout-payment__option--checked {
    border-color: var(--color-primary);
    background: rgba(246, 137, 98, 0.05);
}
.checkout-payment__option-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 18px;
    flex-shrink: 0;
}
.checkout-payment__option-body {
    flex: 1;
    min-width: 0;
}
.checkout-payment__option-title {
    display: block;
    color: var(--color-secondary);
    font-weight: 700;
    font-size: 14px;
}
.checkout-payment__option-desc {
    display: block;
    color: var(--color-text-dark-light, rgba(41, 41, 41, 0.66));
    font-size: 12px;
}

.checkout-error {
    margin-bottom: 12px;
    padding: 10px 14px;
    background: rgba(220, 53, 69, 0.08);
    border: 1px solid rgba(220, 53, 69, 0.2);
    color: #dc3545;
    border-radius: 10px;
    font-size: 14px;
}

.checkout-empty {
    text-align: center;
    padding: 60px 20px;
}
.checkout-empty__icon {
    font-size: 56px;
    color: rgba(0, 0, 0, 0.15);
    margin-bottom: 12px;
}

/* ---------- Checkout tabs ---------- */
.checkout-tabs {
    display: flex;
    gap: 8px;
    background: #fafafa;
    padding: 6px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 0, 0, 0.04);
    list-style: none;
}
.checkout-tabs .nav-item {
    flex: 1;
}
.checkout-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    padding: 12px 8px;
    background: transparent;
    color: var(--color-text-dark-light, rgba(41, 41, 41, 0.66));
    border: 0;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.checkout-tab i {
    font-size: 18px;
    color: rgba(0, 0, 0, 0.4);
    transition: color 0.2s ease;
}
.checkout-tab:hover:not(.active) {
    background: rgba(0, 0, 0, 0.02);
    color: var(--color-secondary, #292929);
}
.checkout-tab.active {
    background: #fff;
    color: var(--color-primary, #f68962);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.checkout-tab.active i {
    color: var(--color-primary, #f68962);
}
.checkout-pane__title {
    color: var(--color-secondary, #292929);
    font-weight: 700;
    font-size: 17px;
    margin: 0 0 4px;
}
.checkout-pane__subtitle {
    color: var(--color-text-dark-light, rgba(41, 41, 41, 0.66));
    margin: 0 0 20px;
    font-size: 13px;
}
.checkout-tab-content {
    min-height: 200px;
}
.checkout-form .donation-field {
    margin-bottom: 16px;
}

/* Anonymous toggle card */
.checkout-anonymous {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: #fafafa;
    border: 1.5px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    margin: 16px 0 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.checkout-anonymous:hover {
    border-color: rgba(246, 137, 98, 0.3);
    background: #fff;
}
.checkout-anonymous:has(input:checked) {
    border-color: var(--color-primary, #f68962);
    background: rgba(246, 137, 98, 0.04);
}
.checkout-anonymous input {
    flex-shrink: 0;
    margin: 0;
}
.checkout-anonymous__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.checkout-anonymous__title {
    color: var(--color-secondary, #292929);
    font-weight: 700;
    font-size: 14px;
}
.checkout-anonymous__hint {
    color: var(--color-text-dark-light, rgba(41, 41, 41, 0.66));
    font-size: 12px;
}
.checkout-anonymous__icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 0, 0, 0.3);
    font-size: 16px;
    transition: all 0.2s ease;
}
.checkout-anonymous:has(input:checked) .checkout-anonymous__icon {
    color: var(--color-primary, #f68962);
}

/* ---------- Minimal layout page ---------- */
.minimal-page {
    background: #fafafa;
    min-height: 100vh;
    margin: 0;
    font-family: var(--font-family-primary, 'Cairo', sans-serif);
    color: var(--color-secondary, #292929);
}
.minimal-page__main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-page--centered {
    padding: 32px 16px;
    width: 100%;
}
.checkout-result__brand {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
    text-decoration: none;
}
.checkout-result__brand img {
    border-radius: 12px;
}

/* ---------- Checkout result (success / failed) ---------- */
.checkout-result {
    max-width: 560px;
    margin: 40px auto;
    background: #fff;
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
}
.checkout-result__icon {
    width: 96px;
    height: 96px;
    margin: 0 auto 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}
.checkout-result--success .checkout-result__icon {
    background: rgba(40, 167, 69, 0.12);
    color: #28a745;
}
.checkout-result--failed .checkout-result__icon {
    background: rgba(220, 53, 69, 0.12);
    color: #dc3545;
}
.checkout-result__title {
    color: var(--color-secondary, #292929);
    font-weight: 800;
    margin-bottom: 12px;
    font-size: 28px;
}
.checkout-result__subtitle {
    color: var(--color-text-dark-light, rgba(41, 41, 41, 0.66));
    margin-bottom: 32px;
    line-height: 1.6;
}
.checkout-result__details {
    background: #fafafa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    text-align: start;
}
.checkout-result__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.06);
    gap: 12px;
}
.checkout-result__row:last-child { border-bottom: 0; }
.checkout-result__label {
    color: var(--color-text-dark-light, rgba(41, 41, 41, 0.66));
    font-size: 14px;
    flex-shrink: 0;
}
.checkout-result__value {
    color: var(--color-secondary, #292929);
    font-weight: 600;
    font-size: 14px;
    text-align: end;
    word-break: break-word;
}
.checkout-result__value--accent {
    color: var(--color-primary, #f68962);
    font-weight: 800;
    font-size: 18px;
}
.checkout-result__value--mono {
    font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    font-size: 12px;
}
.checkout-result__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}
.checkout-result__actions .donation-btn { min-width: 180px; }
@media (max-width: 575px) {
    .checkout-result { padding: 32px 20px; }
    .checkout-result__actions .donation-btn { width: 100%; min-width: 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 575px) {
    .cart-offcanvas { width: 100%; }
    .donation-amount-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Toast ---------- */
#donationToastHost .toast {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

/* ---------- Confirm dialog ---------- */
.cd .modal-dialog { max-width: 420px; }
.cd__content {
    border: 0; border-radius: 18px; padding: 28px 24px;
    text-align: center; box-shadow: 0 25px 60px rgba(15, 23, 42, 0.22);
}
.cd__icon {
    width: 64px; height: 64px; margin: 0 auto 14px;
    border-radius: 50%; display: inline-flex; align-items: center;
    justify-content: center; font-size: 1.7rem;
}
.cd--danger  .cd__icon { background: #fef2f2; color: #dc2626; }
.cd--warning .cd__icon { background: #fffbeb; color: #d97706; }
.cd--primary .cd__icon { background: #fff5f0; color: #F68962; }

.cd__title {
    font-size: 1.2rem; font-weight: 800; color: #0f172a;
    margin: 0 0 8px;
}
.cd__message {
    font-size: .95rem; color: #475569; line-height: 1.75;
    margin: 0 0 22px;
}
.cd__actions {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.cd__btn {
    border: 0; border-radius: 11px; padding: 12px 16px;
    font-weight: 700; font-size: .95rem; cursor: pointer;
    transition: all .15s ease;
}
.cd__btn--ghost {
    background: #f1f5f9; color: #334155;
}
.cd__btn--ghost:hover { background: #e2e8f0; color: #0f172a; }
.cd__btn--danger { background: #dc2626; color: #fff; }
.cd__btn--danger:hover { background: #b91c1c; }
.cd__btn--warning { background: #d97706; color: #fff; }
.cd__btn--warning:hover { background: #b45309; }
.cd__btn--primary {
    background: var(--color-primary, #F68962); color: #fff;
}
.cd__btn--primary:hover { background: #e67a55; }

/* ---------- Floating Quick Donate FAB ---------- */
.donate-fab {
    position: fixed;
    bottom: 32px;
    right: 24px;
    z-index: 990;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 22px;
    background: linear-gradient(135deg, #f68962 0%, #e0674a 100%);
    color: #fff;
    border: none;
    outline: none;
    border-radius: 50px;
    font-weight: 800;
    font-size: 14px;
    text-decoration: none;
    box-shadow: 0 8px 28px rgba(246, 137, 98, 0.45), 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    transform: translateY(16px) scale(0.9);
    pointer-events: none;
    white-space: nowrap;
}
.donate-fab.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.donate-fab:hover {
    color: #fff;
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 14px 36px rgba(246, 137, 98, 0.55), 0 4px 12px rgba(0,0,0,0.1);
}
.donate-fab__icon {
    font-size: 15px;
}
html[dir="rtl"] .donate-fab {
    right: auto;
    left: 24px;
}
@media (max-width: 575px) {
    .donate-fab {
        bottom: 20px;
        right: 16px;
        padding: 12px 18px;
        font-size: 13px;
    }
    html[dir="rtl"] .donate-fab {
        right: auto;
        left: 16px;
    }
}

/* ---------- Cart offcanvas — design matching site ---------- */
.cart-offcanvas {
    border-radius: 20px 0 0 20px;
}
html[dir="rtl"] .cart-offcanvas {
    border-radius: 0 20px 20px 0;
}
.cart-offcanvas .offcanvas-header {
    background: linear-gradient(135deg, #fff7f3 0%, #ffece1 100%);
}
