/* ============================================================
   Wilow Web Checkout — styles
   Builds on the shared design system (colors_and_type.css) and the
   landing styles (landing.css → .nav, .footer, .btn, .container).
   All checkout-specific rules are namespaced with `.co-`.
   Each package card carries its own accent via an inline --accent var.
   ============================================================ */

/* ── Inline icons (reference the <svg> sprite via <use>) ───────── */

html[dir="rtl"] body {
  font-family: var(--font-arabic);
}
.card-content * {
  font-family: "DIN Arabic";
}
.ico {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

/* ── Page shell ─────────────────────────────────────────────── */
.co {
  background: var(--cream-0);
}
.co-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 20px 120px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 34px;
  align-items: start;
}
.co-main {
  display: flex;
  flex-direction: column;
  gap: 36px;
  min-width: 0;
}

/* ── Section header (numbered) ──────────────────────────────── */
.co-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.co-num {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  display: grid;
  place-items: center;
  font: 600 14px/1 var(--font-arabic);
  margin-top: 2px;
}
.co-head__main {
  flex: 1;
  min-width: 0;
}
.co-head__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.co-head h2 {
  font: 500 22px/1.15 var(--font-arabic);
  color: #111;
  margin: 0;
}
.co-head p {
  font: 400 13.5px/1.5 var(--font-arabic);
  color: var(--ink-500);
  margin: 5px 0 0;
}
.co-subhead {
  font: 500 22px/1.15 var(--font-arabic);
  color: #111;
  margin: 30px 0 16px;
}

/* ── Package list ───────────────────────────────────────────── */
.co-pkgs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.co-pkg {
  --accent: var(--wilow-orange);
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  background: var(--cream-2);
  border: 2px solid transparent;
  transition:
    border-color 0.18s,
    box-shadow 0.18s;
}
.co-pkg.is-open {
  border-color: var(--accent);
  box-shadow: var(--shadow-card);
}

.co-pkg__head {
  position: relative;
  width: 100%;
  text-align: start;
  cursor: pointer;
  border: none;
  background: transparent;
  display: block;
  padding: 18px 30px 16px 18px; /* room for art on the inline-end */
  font-family: var(--font-arabic);
}
.co-pkg.is-open .co-pkg__head {
  cursor: default;
}
.co-pkg__art {
  position: absolute;
  inset-inline-end: 14px;
  top: 14px;
  width: 70px;
  height: 50px;
  display: grid;
  place-items: center;
  pointer-events: none;
  transition:
    width 0.18s,
    height 0.18s;
}
.co-pkg.is-open .co-pkg__art {
  width: 60px;
  height: 60px;
}
.co-pkg__art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.co-pkg__title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.co-pkg__name {
  font: 500 24px/1.1 var(--font-arabic);
  color: #111;
}
.co-pkg__badge {
  font: 700 10px/1 var(--font-arabic);
  color: #111;
  background: var(--wilow-yellow);
  padding: 4px 9px;
  border-radius: 999px;
}
.co-pkg__fits {
  display: block;
  font: 400 13.5px/1.4 var(--font-arabic);
  color: var(--ink-500);
  margin-top: 5px;
}
.co-pkg__kg {
  display: inline-block;
  font: 700 12px/1 var(--font-arabic);
  color: #111;
  background: var(--accent);
  padding: 6px 12px;
  border-radius: 999px;
  margin-top: 13px;
}
.co-pkg.is-open .co-pkg__kg {
  display: none;
} /* kg chip only when collapsed */

/* Default state for unselected days: Faded */
.co-day .duck-icon {
  opacity: 0.4;
}

/* 1. Hide the includes section by default */
.co-pkg__includes {
  display: none !important;
}

/* 2. Show it ONLY when the parent card is expanded */
/* Note: Depending on your JS, the active class might be 'is-open', 'is-active', or 'is-sel'. 
   I included the most common ones here so it works immediately. */
.co-pkg.is-open .co-pkg__head .co-pkg__includes,
.co-pkg.is-active .co-pkg__head .co-pkg__includes,
.co-pkg.is-sel .co-pkg__head .co-pkg__includes {
  display: block !important;
}

/* Selected state: Full opacity */
.co-day.is-sel .duck-icon {
  opacity: 1;
}
/* expandable body */
.co-pkg__body {
  display: none;
  padding: 0 16px 18px;
}
.co-pkg.is-open .co-pkg__body {
  display: block;
  animation: co-rise 0.2s var(--ease-out-soft);
}
.co-pkg__label {
  font: 500 13px/1 var(--font-arabic);
  color: var(--ink-600);
  margin: 2px 2px 11px;
}

/* option cards (1 wash / 4 wash · or size tiers) */
.co-opts {
  display: flex;
  gap: 10px;
}
.co-opts.scroll {
  overflow-x: auto;
  padding-bottom: 6px;
  margin-inline: -2px;
  padding-inline: 2px;
}
.co-opt {
  flex: 1 1 0;
  min-width: 0;
  text-align: start;
  cursor: pointer;
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  padding: 0;
  border: 2px solid var(--border-card);
  font-family: var(--font-arabic);
  transition:
    border-color 0.16s,
    box-shadow 0.16s;
}
.co-opts.scroll .co-opt {
  flex: 0 0 172px;
}
.co-opt.is-sel {
  border-color: var(--accent);
  box-shadow: var(--shadow-xs);
}
.co-opt__top {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
}
.co-opt__radio {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex: 0 0 auto;
  border: 2px solid var(--border-strong);
  background: transparent;
  display: grid;
  place-items: center;
  color: #fff;
  transition: all 0.15s;
}
.co-opt__radio svg {
  display: none;
}
.co-opt.is-sel .co-opt__radio {
  border: none;
  background: var(--accent);
}
.co-opt.is-sel .co-opt__radio svg {
  display: block;
}
.co-opt__name {
  flex: 1;
  min-width: 0;
  font: 700 15px/1.1 var(--font-arabic);
  color: #111;
}
.co-opt__off {
  flex: 0 0 auto;
  font: 600 10px/1 var(--font-arabic);
  color: #111;
  background: var(--accent);
  padding: 4px 7px;
  border-radius: 7px;
  white-space: nowrap;
}
.co-opt__div {
  display: block;
  height: 1px;
  background: var(--border-hairline);
}
.co-opt__bot {
  display: block;
  padding: 11px 12px 13px;
}
.co-opt__freq {
  display: block;
  font: 400 12.5px/1.4 var(--font-arabic);
  color: var(--ink-600);
}
.co-opt__per {
  display: flex;
  align-items: center;
  gap: 4px;
  font: 400 12px/1.4 var(--font-arabic);
  color: var(--ink-600);
  margin-top: 3px;
}
.co-opt__total {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  font: 700 14px/1 var(--font-arabic);
  color: #111;
}

/* "includes" chips */
.co-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.co-chips-label {
  font: 500 12.5px/1 var(--font-arabic);
  color: var(--ink-600);
  margin: 17px 2px 11px;
}
.co-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border-radius: 999px;
  padding: 8px 13px;
  font: 400 12.5px/1 var(--font-arabic);
  color: #222;
  box-shadow: var(--shadow-xs);
}
.co-chip .e {
  font-size: 14px;
  line-height: 1;
}

/* ── Money / riyal glyph ────────────────────────────────────── */
.co-money {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: 500 14px/1 var(--font-arabic);
  color: #111;
  direction: rtl;
}
.co-money.bold {
  font-weight: 700;
}
.co-riyal {
  width: 13px;
  height: 14.5px;
  vertical-align: -1px;
}
.co-riyal.orange {
  filter: invert(36%) sepia(89%) saturate(1200%) hue-rotate(346deg);
}
.co-riyal.white {
  filter: invert(1);
}

/* ── Fields ─────────────────────────────────────────────────── */
.co-field {
  display: block;
}
.co-field__label {
  display: flex;
  gap: 3px;
  margin-bottom: 7px;
  align-items: center;
}
.co-field__label span {
  font: 500 12px/1 var(--font-arabic);
  color: var(--ink-500);
}
.co-field__label .req {
  color: var(--wilow-red);
}
.co-field__box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid var(--border-strong);
  border-radius: 12px;
  padding: 0 14px;
  height: 50px;
  transition: border-color 0.16s;
}
.co-field__box.area {
  height: auto;
  padding: 12px 14px;
}
.co-field__box:focus-within {
  border-color: #111;
}
.co-field__box input,
.co-field__box textarea {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  resize: none;
  font: 500 15px/1.4 var(--font-arabic);
  color: #111;
  text-align: right;
}
.co-field__box.ltr input,
.co-field__box.ltr textarea {
  direction: ltr;
  text-align: left;
}
.co-field__suffix {
  font: 500 13px/1 var(--font-arabic);
  color: var(--ink-400);
  white-space: nowrap;
}
.co-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── Segmented (home type) ──────────────────────────────────── */
.co-seg {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.co-seg__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  cursor: pointer;
  font: 500 14px/1 var(--font-arabic);
  border: 1.5px solid var(--border-card);
  background: #fff;
  color: #111;
  transition: all 0.16s var(--ease-out-soft);
}
.co-seg__btn.is-sel {
  border-color: transparent;
  background: #111;
  color: #fff;
}
.co-fieldset-label {
  font: 500 12px/1 var(--font-arabic);
  color: var(--ink-500);
  margin-bottom: 8px;
}

/* ── Map picker ─────────────────────────────────────────────── */
.co-map {
  position: relative;
  height: 200px;
  border-radius: 16px;
  overflow: hidden;
  cursor: crosshair;
  border: 1px solid var(--border-card);
  user-select: none;
  background:
    repeating-linear-gradient(0deg, transparent 0 30px, #f4f1ea 30px 37px),
    repeating-linear-gradient(90deg, transparent 0 44px, #f4f1ea 44px 52px),
    linear-gradient(135deg, #e8ede4 0%, #dde6e0 100%);
}
.co-map__hint {
  position: absolute;
  inset-inline-start: 8px;
  bottom: 6px;
  font: 500 9px/1 var(--font-arabic);
  color: #9aa39a;
}
.co-map__pin {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -100%);
  cursor: grab;
  filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.28));
}
.co-map__pin.dragging {
  cursor: grabbing;
}
.co-map__recenter {
  position: absolute;
  inset-inline-end: 10px;
  bottom: 10px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  border: none;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--wilow-orange);
}
.co-pinhint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 2px 16px;
  font: 400 11.5px/1.3 var(--font-arabic);
  color: var(--ink-400);
}
.co-pinhint__coords {
  color: var(--wilow-green);
  margin-inline-start: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.co-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* تنسيقات قائمة الملف الشخصي المنسدلة */
.co-profile-dropdown {
  position: relative;
  display: inline-block;
}

.co-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: auto;
  background: #ffffff;
  min-width: 160px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 4px 0;
  z-index: 999;
  margin-top: 8px;
  border: 1px solid #eee;
}

.co-dropdown-menu.is-active {
  display: block;
}

.co-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  background: none;
  border: none;
  text-align: right;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease;
}

.co-dropdown-item:hover {
  background: #fff5f2;
  color: #d93025;
}
/* ── Pickup ─────────────────────────────────────────────────── */
.co-label {
  font: 500 14px/1 var(--font-arabic);
  color: #111;
  margin-bottom: 10px;
}
.co-label.mt {
  margin: 18px 0 10px;
}
.co-days {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-inline: -2px;
  padding-inline: 2px;
}
.co-day {
  flex: 0 0 auto;
  width: 60px;
  height: 78px;
  border-radius: 14px;
  cursor: pointer;
  border: none;
  background: var(--cream-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  position: relative;
  transition: all 0.16s var(--ease-out-soft);
  font-family: var(--font-arabic);
}
.co-day.is-sel {
  background: var(--wilow-blue);
}
.co-day[disabled] {
  opacity: 0.4;
  cursor: default;
}
.co-day__ico {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  color: var(--ink-300);
}
.co-day.is-sel .co-day__ico {
  color: #111;
}
.co-day__name {
  font: 500 12px/1 var(--font-arabic);
  color: #111;
}
.co-day__dm {
  font: 400 11px/1 var(--font-arabic);
  color: var(--ink-500);
}
.co-day__x {
  position: absolute;
  bottom: -1px;
  font: 400 8px/1 var(--font-arabic);
  color: var(--wilow-red);
}

.co-periods {
  display: flex;
  gap: 10px;
}
.co-period {
  flex: 1;
  border-radius: 14px;
  cursor: pointer;
  padding: 14px 16px;
  text-align: start;
  border: 2px solid var(--border-card);
  background: #fff;
  color: #111;
  transition: all 0.16s var(--ease-out-soft);
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-arabic);
}
.co-period.is-sel {
  border-color: var(--wilow-orange);
  background: var(--wilow-orange);
  color: #fff;
}
.co-period__label {
  font: 500 15px/1.1 var(--font-arabic);
}
.co-period__range {
  font: 400 12px/1.2 var(--font-arabic);
  opacity: 0.85;
  margin-top: 3px;
}

.co-tnote {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  background: #fef3cf;
  border: 1px solid var(--wilow-yellow);
  border-radius: 14px;
  padding: 11px 14px;
}
.co-tnote span {
  font: 400 12.5px/1.4 var(--font-arabic);
  color: #3a2e00;
}
.co-tnote .ico {
  color: var(--wilow-orange);
  flex: 0 0 auto;
}

/* ── Login gate ─────────────────────────────────────────────── */
.co-gate {
  border: 1.5px dashed var(--border-strong);
  border-radius: 18px;
  padding: 28px 22px;
  text-align: center;
  background: var(--cream-1);
}
.co-gate__lock {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
}
.co-gate__title {
  font: 500 16px/1.3 var(--font-arabic);
  color: #111;
  margin-bottom: 6px;
}
.co-gate p {
  font: 400 12.5px/1.5 var(--font-arabic);
  color: var(--ink-500);
  margin: 0 auto 16px;
  max-width: 320px;
}

/* ── Summary sidebar ────────────────────────────────────────── */
.co-summary {
  position: sticky;
  top: 88px;
}
.co-summary__card {
  background: #fff;
  border: 1px solid var(--border-card);
  border-radius: 22px;
  padding: 20px 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.co-summary__title {
  font: 500 18px/1 var(--font-arabic);
  color: #111;
}
.co-line {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 0;
}
.co-line__art {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--cream-2);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.co-line__art img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.co-line__main {
  flex: 1;
  min-width: 0;
}
.co-line__name {
  font: 500 14px/1.1 var(--font-arabic);
  color: #111;
}
.co-line__sub {
  font: 400 11.5px/1 var(--font-arabic);
  color: var(--ink-500);
  margin-top: 3px;
}

.co-coupon {
  display: flex;
  gap: 8px;
}
.co-coupon .co-field {
  flex: 1;
}
.co-coupon__msg {
  font: 500 11px/1 var(--font-arabic);
  margin-top: 6px;
  display: none;
  align-items: center;
  gap: 4px;
}
.co-coupon__msg.ok {
  color: var(--wilow-green);
}
.co-coupon__msg.bad {
  color: var(--wilow-red);
}

.co-hr {
  height: 1px;
  background: var(--border-hairline);
}
.co-prow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
}
.co-prow__label {
  font: 500 13px/1.2 var(--font-arabic);
  color: var(--ink-500);
}
.co-prow.strong .co-prow__label {
  font-weight: 700;
  font-size: 16px;
  color: #111;
}
.co-prow__val.green {
  color: var(--wilow-green);
}
.co-vat {
  font: 400 11px/1 var(--font-arabic);
  color: var(--ink-400);
  text-align: start;
}

.co-picknote {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: var(--wilow-blue-soft);
  border-radius: 14px;
  padding: 11px 13px;
}
.co-picknote span {
  font: 400 12px/1.5 var(--font-arabic);
  color: #1c3a5e;
}
.co-picknote .ico {
  color: var(--wilow-blue-mid);
  flex: 0 0 auto;
  margin-top: 1px;
}
.co-loginnote {
  font: 400 11px/1.5 var(--font-arabic);
  color: var(--ink-400);
  text-align: center;
  margin: 12px 14px 0;
}

/* ── Buttons (checkout) ─────────────────────────────────────── */
.co-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  font: 500 16px/1 var(--font-arabic);
  transition:
    transform 0.14s var(--ease-out-soft),
    opacity 0.18s,
    background 0.18s;
  height: 54px;
  padding: 0 22px;
  border-radius: 12px;
}
.co-btn:active:not(:disabled) {
  transform: scale(0.97);
}
.co-btn:hover:not(:disabled) {
  opacity: 0.92;
}
.co-btn--full {
  width: 100%;
}
.co-btn--dark {
  background: #111;
  color: #fff;
}
.co-btn--soft {
  background: var(--cream-2);
  color: #111;
  height: 50px;
}
.co-btn--sm {
  height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 14px;
}
.co-btn:disabled {
  background: #f2f2f2 !important;
  color: #bfbfbf !important;
  cursor: default;
}

/* ── Modal (auth / payment) ─────────────────────────────────── */
.co-modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(17, 17, 17, 0.42);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.co-modal[hidden] {
  display: none;
}
.co-modal__card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 24px 24px 0 0;
  padding: 24px 22px calc(22px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-lg);
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
  animation: co-sheet 0.28s var(--ease-out-soft);
}
@media (min-width: 560px) {
  .co-modal {
    align-items: center;
  }
  .co-modal__card {
    border-radius: 24px;
  }
}
.co-modal__close {
  position: absolute;
  inset-inline-end: 18px;
  top: 18px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--cream-2);
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #111;
}
.co-modal__ico {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--wilow-orange);
  display: grid;
  place-items: center;
  color: #fff;
  margin-bottom: 14px;
}
.co-modal h3 {
  font: 500 23px/1.15 var(--font-arabic);
  color: #111;
  margin: 0 0 6px;
}
.co-modal p {
  font: 400 13.5px/1.5 var(--font-arabic);
  color: var(--ink-500);
  margin: 0 0 18px;
}
.co-phone-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  direction: ltr;
}
.co-phone-cc {
  display: grid;
  place-items: center;
  padding: 0 14px;
  height: 50px;
  border-radius: 12px;
  background: var(--cream-2);
  font: 500 15px/1 var(--font-arabic);
  color: #111;
}
.co-authwhy {
  display: flex;
  align-items: center;
  gap: 6px;
  font: 400 11.5px/1.3 var(--font-arabic);
  color: var(--ink-400);
  margin: 4px 2px 18px;
}
.co-otp {
  width: 100%;
  height: 62px;
  border-radius: 14px;
  border: 1.5px solid var(--border-strong);
  text-align: center;
  letter-spacing: 14px;
  font: 600 26px/1 var(--font-arabic);
  color: #111;
  outline: none;
  box-sizing: border-box;
  padding-inline-start: 14px;
}
.co-hintline {
  font: 400 11px/1 var(--font-arabic);
  color: var(--ink-400);
  margin: 8px 2px 16px;
}
.co-resend {
  text-align: center;
  margin-top: 12px;
  font: 400 12px/1 var(--font-arabic);
  color: var(--wilow-orange);
  cursor: pointer;
}
.co-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}
.co-divider .ln {
  flex: 1;
  height: 1px;
  background: var(--border-hairline);
}
.co-divider span {
  font: 400 12px/1 var(--font-arabic);
  color: var(--ink-400);
}
.co-applepay {
  width: 100%;
  height: 54px;
  border-radius: 12px;
  border: none;
  background: #111;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.co-paysecure {
  display: flex;
  align-items: center;
  gap: 6px;
  font: 400 11.5px/1 var(--font-arabic);
  color: var(--ink-400);
  margin-bottom: 18px;
}
.co-pay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

/* modal phases — show one at a time via [data-phase] + .is-active */
.co-phase {
  display: none;
}
.co-phase.is-active {
  display: block;
}

/* ── Bottom bar (mobile) ────────────────────────────────────── */
.co-bottombar {
  display: none;
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 45;
  background: #fff;
  border-top: 1px solid var(--border-hairline);
  box-shadow: 0 -8px 30px rgba(17, 17, 17, 0.06);
}
.co-bottombar__inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 14px;
}
.co-bottombar__total .lbl {
  font: 400 11px/1 var(--font-arabic);
  color: var(--ink-400);
  margin-bottom: 4px;
}
.co-bottombar__cta {
  margin-inline-start: auto;
}

/* ── Success ────────────────────────────────────────────────── */
.co-success {
  display: none;
  min-height: 70vh;
  align-items: center;
  justify-content: center;
  padding: 40px 18px;
}
.co-success.is-active {
  display: flex;
}
.co-success__card {
  width: 100%;
  max-width: 560px;
  background: #fff;
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: co-rise 0.5s var(--ease-out-soft);
}
.co-success__hero {
  position: relative;
  padding: 40px 28px 30px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(180deg, #fff6e6 0%, #fff 100%);
}
.co-success__hero h1 {
  font: 500 30px/1.1 var(--font-arabic);
  color: #111;
  margin: 0 0 8px;
}
.co-success__hero p {
  font: 400 14px/1.5 var(--font-arabic);
  color: var(--ink-600);
  margin: 0 auto;
  max-width: 380px;
}
.co-success__meta {
  display: inline-flex;
  gap: 18px;
  margin-top: 18px;
  background: #fff;
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 12px 20px;
}
.co-success__meta .k {
  font: 400 11px/1 var(--font-arabic);
  color: var(--ink-400);
  margin-bottom: 5px;
}
.co-success__meta .v {
  font: 600 15px/1 var(--font-arabic);
  color: #111;
}
.co-success__app {
  padding: 26px 28px 30px;
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
  border-top: 1px solid var(--border-hairline);
}
.co-success__app h2 {
  font: 500 20px/1.2 var(--font-arabic);
  color: #111;
  margin: 0 0 8px;
}
.co-success__app p {
  font: 400 13px/1.5 var(--font-arabic);
  color: var(--ink-500);
  margin: 0 0 16px;
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes co-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes co-sheet {
  from {
    transform: translateY(18px);
  }
  to {
    transform: translateY(0);
  }
}
@keyframes co-rise {
  from {
    transform: translateY(12px);
  }
  to {
    transform: translateY(0);
  }
}
.co-spin {
  animation: co-spin 0.7s linear infinite;
}

/* thin scrollbars */
.co-days,
.co-opts.scroll {
  scrollbar-width: thin;
  scrollbar-color: var(--ink-200) transparent;
}
.co-days::-webkit-scrollbar,
.co-opts.scroll::-webkit-scrollbar {
  height: 5px;
}
.co-days::-webkit-scrollbar-thumb,
.co-opts.scroll::-webkit-scrollbar-thumb {
  background: var(--ink-200);
  border-radius: 3px;
}

/* ── Responsive: single-column + bottom bar under 900px ─────── */
@media (max-width: 900px) {
  .co-wrap {
    grid-template-columns: 1fr;
    padding-bottom: 130px;
  }
  .co-summary {
    position: static;
  }
  .co-summary .co-btn--full {
    display: none;
  } /* CTA lives in the bottom bar on mobile */
  .co-summary .co-picknote {
    display: none;
  }
  .co-bottombar {
    display: block;
  }
}
@media (max-width: 520px) {
  .co-2col {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
  }
}
