/* Professional donation cart drawer + checkout helpers */

.ou-cart-badge {
  position: absolute;
  top: -0.35rem;
  inset-inline-end: -0.35rem;
  display: inline-flex;
  min-width: 1.25rem;
  height: 1.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fff;
  color: #381830;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0 0.3rem;
  line-height: 1;
  box-shadow: 0 0 0 2px #381830;
}

.ou-mini-cart__overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.35s;
}
.ou-mini-cart__overlay--show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s;
}

/* Clip shell is viewport-sized with no transform — translated children cannot
   widen the document (iOS RTL treats off-screen translate as scrollable). */
.ou-mini-cart {
  position: fixed;
  inset: 0;
  z-index: 96;
  width: auto;
  height: auto;
  max-width: none;
  overflow: hidden;
  transform: none;
  pointer-events: none;
  visibility: hidden;
}
.ou-mini-cart--show {
  pointer-events: auto;
  visibility: visible;
}
.ou-mini-cart[hidden] {
  display: none !important;
}
body.ou-mini-cart-open {
  overflow: hidden;
}

.ou-mini-cart__shell {
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-end: 0;
  display: flex;
  flex-direction: column;
  width: min(420px, 100%);
  max-width: 100%;
  height: 100%;
  background: #fff;
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.18);
  transform: translate3d(100%, 0, 0);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
  backface-visibility: hidden;
}
html[dir="rtl"] .ou-mini-cart__shell {
  transform: translate3d(-100%, 0, 0);
  box-shadow: 12px 0 40px rgba(15, 23, 42, 0.18);
}
.ou-mini-cart--show .ou-mini-cart__shell,
html[dir="rtl"] .ou-mini-cart--show .ou-mini-cart__shell {
  transform: none;
}

.ou-mini-cart__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.35rem 1rem;
  border-bottom: 1px solid #eef2f7;
}
.ou-mini-cart__eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
  font-weight: 600;
}
.ou-mini-cart__head h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
}
.ou-mini-cart__close {
  border: 0;
  background: #f3f4f6;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  font-size: 1.4rem;
  line-height: 1;
  color: #4b5563;
  cursor: pointer;
}
.ou-mini-cart__close:hover { background: #e5e7eb; color: #111827; }

.ou-mini-cart__body {
  flex: 1;
  overflow: auto;
  padding: 0.75rem 1.1rem 1rem;
}

.ou-mini-cart__error {
  margin: 0.25rem 0 0.85rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid #fecaca;
  border-radius: 0.65rem;
  background: #fef2f2;
  color: #991b1b;
  font-size: 0.875rem;
  line-height: 1.45;
}

.ou-mini-cart__empty {
  text-align: center;
  padding: 2.5rem 1rem;
}
.ou-mini-cart__empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8fafc, #eef2ff);
  color: #381830;
}
.ou-mini-cart__empty h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
}
.ou-mini-cart__empty p {
  margin: 0 0 1.25rem;
  color: #6b7280;
  font-size: 0.95rem;
  line-height: 1.5;
}

.ou-mini-cart__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.ou-mini-cart__item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid #eef2f7;
  border-radius: 0.9rem;
  background: #fafbfc;
}
.ou-mini-cart__item-title {
  display: block;
  font-weight: 600;
  color: #1f2937;
  text-decoration: none;
  line-height: 1.35;
}
.ou-mini-cart__item-title:hover { color: #381830; }
.ou-mini-cart__item-meta {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: #6b7280;
}
.ou-mini-cart__remove {
  border: 0;
  background: transparent;
  color: #9ca3af;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
}
.ou-mini-cart__remove:hover { color: #dc2626; }

.ou-mini-cart__foot {
  padding: 1rem 1.25rem 1.35rem;
  border-top: 1px solid #eef2f7;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.ou-mini-cart__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.25rem;
  color: #374151;
  font-size: 0.95rem;
}
.ou-mini-cart__total strong {
  font-size: 1.2rem;
  color: #111827;
}

.ou-mini-cart__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  border-radius: 0.7rem;
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.ou-mini-cart__btn--primary {
  background: #381830;
  color: #fff;
}
.ou-mini-cart__btn--primary:hover { background: #2a1530; color: #fff; }
.ou-mini-cart__btn--ghost {
  background: #fff;
  color: #381830;
  border: 1px solid #e5e7eb;
}
.ou-mini-cart__btn--ghost:hover { border-color: #381830; }

.ou-cart-toast {
  position: fixed;
  z-index: 110;
  left: 1rem;
  right: 1rem;
  bottom: 1.5rem;
  width: auto;
  max-width: 24rem;
  margin-inline: auto;
  transform: translateY(12px);
  background: #111827;
  color: #fff;
  padding: 0.75rem 1.15rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  box-sizing: border-box;
}
.ou-cart-toast--show {
  opacity: 1;
  transform: translateY(0);
}

/* Cart / checkout page — do not depend on missing Tailwind lg:grid-cols-5. */
html[data-ou-page="checkout"],
html[data-ou-page="cart"] {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  overscroll-behavior-x: none;
}
html[data-ou-page="checkout"] body,
html[data-ou-page="cart"] body,
html[data-ou-page="checkout"] header,
html[data-ou-page="cart"] header,
html[data-ou-page="checkout"] nav,
html[data-ou-page="cart"] nav,
html[data-ou-page="checkout"] footer,
html[data-ou-page="cart"] footer,
html[data-ou-page="checkout"] #main-content,
html[data-ou-page="cart"] #main-content {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  align-self: stretch;
}
.ou-checkout-page,
.ou-checkout {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.ou-checkout form {
  position: relative;
}
.ou-checkout {
  max-width: 72rem;
}
.ou-checkout-layout {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.ou-checkout-main,
.ou-checkout-aside {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.ou-checkout-main form,
.ou-checkout-fields,
.ou-checkout input:not([type="radio"]):not([type="checkbox"]),
.ou-checkout select,
.ou-checkout textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.ou-checkout-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
.ou-checkout-field-full {
  grid-column: 1 / -1;
}
@media (min-width: 640px) {
  .ou-checkout-fields {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}
@media (min-width: 1024px) {
  .ou-checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    align-items: start;
    gap: 2rem;
  }
}
@media (max-width: 1023px) {
  [class*="lg:grid-cols-5"] {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    grid-template-columns: none !important;
  }
  [class*="lg:grid-cols-5"] > [class*="col-span"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    grid-column: auto !important;
  }
}

/* Cart / checkout page */
.ou-donate-steps {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.ou-donate-steps__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #9ca3af;
  font-size: 0.9rem;
  font-weight: 600;
}
.ou-donate-steps__num {
  display: inline-flex;
  width: 1.75rem;
  height: 1.75rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e5e7eb;
  color: #6b7280;
  font-size: 0.8rem;
}
.ou-donate-steps__item.is-active { color: #381830; }
.ou-donate-steps__item.is-active .ou-donate-steps__num {
  background: #381830;
  color: #fff;
}
.ou-donate-steps__item.is-done { color: #059669; }
.ou-donate-steps__item.is-done .ou-donate-steps__num {
  background: #d1fae5;
  color: #047857;
}
.ou-donate-steps__sep {
  width: 1.5rem;
  height: 1px;
  background: #d1d5db;
}

.ou-checkout-banks,
.ou-checkout-bank {
  min-width: 0;
  overflow: hidden;
}
.ou-checkout-bank__title {
  display: block;
}
.ou-checkout-bank__meta {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #6b7280;
  overflow-wrap: anywhere;
}
.ou-checkout-bank__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
  min-width: 0;
}
.ou-checkout-bank__value {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-all;
  font-size: 0.8rem;
  line-height: 1.35;
  color: #374151;
}
.ou-checkout-bank__copy {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  border: 1px solid rgb(32 176 120 / 0.35);
  background: #ecfdf5;
  color: #047857;
}
.ou-checkout-bank__copy.is-copied {
  background: #047857;
  color: #fff;
}

.ou-shamcash-pay {
  min-width: 0;
}
.ou-shamcash-pay__qr {
  margin: 0 auto 0.25rem;
  max-width: 17.5rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1.25rem;
  text-align: center;
}
.ou-shamcash-pay__qr img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
}
.ou-shamcash-pay__qr figcaption {
  margin-top: 0.65rem;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #374151;
}
.ou-shamcash-pay__steps {
  margin: 0;
  padding-inline-start: 1.25rem;
  color: #374151;
  font-size: 0.9rem;
  line-height: 1.55;
}
.ou-shamcash-pay__steps li + li {
  margin-top: 0.4rem;
}
.ou-checkout-method {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  width: 100%;
  margin: 0;
  padding: 1rem 1.1rem;
  cursor: pointer;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  background: #fff;
  text-align: start;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.ou-checkout-method input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 1.25rem !important;
  height: 1.25rem !important;
  min-width: 1.25rem !important;
  max-width: 1.25rem !important;
  margin: 0.2rem 0 0;
  padding: 0;
  border: 2px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  box-shadow: none;
  accent-color: #381830;
}
.ou-checkout-method input[type="radio"]:checked {
  border-color: #381830;
  background: #fff;
  box-shadow: inset 0 0 0 0.28rem #381830;
}
.ou-checkout-method__body {
  flex: 1 1 auto;
  min-width: 0;
  text-align: start;
}
.ou-checkout-method__title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  color: #284B5C;
  line-height: 1.4;
}
.ou-checkout-method__logo {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  flex: 0 0 auto;
  object-fit: contain;
  border-radius: 0.35rem;
  background: #fff;
}
.ou-checkout-method__hint {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #6b7280;
}
.ou-checkout-method:has(input:checked) {
  border-color: #381830;
  background: #faf7fa;
  box-shadow: 0 0 0 1px #381830;
}

@media (max-width: 640px) {
  .ou-mini-cart { width: 100%; max-width: 100%; }
}

/* Home / appeals cards — breathing room for Donate + carousel arrows */
#appeals .ou-appeal-card__cta,
#appeals-list .ou-appeal-card__cta {
  margin-top: 1.25rem !important;
}
#appeals .ou-appeals-slider__nav {
  margin-left: 0 !important;
  margin-right: 0 !important;
}
