/* Dadrose installments 1.2.0 — purchase box (#cp-buy), «از ماهی …» card labels, mobile bar line, /installment-terms/.
   No build step. Every rule is scoped to .dri* so nothing else on the page changes; colours follow the course page (navy #072A5D, gold #D7AE1C). */

.dri, .dri *, .dri-month, .dri-bar-line, .dri-terms-wrap, .dri-terms-wrap * { box-sizing: border-box; }

/* the box replaces the price line of the card; the card's own buy button stays (cash) */
.dri-on .cp-price { display: none; }
.dri-on.dri-inst [data-cp-buy][data-cp-where="card"] { display: none; }
/* the account already has the course in installments (confirmed by the CRM): no cash button, in the card or in the phone bar */
.dri-on.dri-own [data-cp-buy], .dri-own-page .cp-bar [data-cp-buy] { display: none; }

.dri { --dri-navy: #072a5d; --dri-gold: #d7ae1c; --dri-gold-tint: #fbf4dc; --dri-ink: #0f172a; --dri-muted: #55637a; --dri-line: #e2e8f0; --dri-green: #0b7a52;
  border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px;
  font-family: inherit; color: var(--dri-ink); direction: rtl; text-align: right; }
.dri-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.dri-opt { display: block; position: relative; border: 2px solid var(--dri-line); border-radius: 14px; padding: 12px 14px; cursor: pointer; background: #fff; transition: border-color .15s, background-color .15s; }
.dri-opt:hover { border-color: #cbd5e1; }
.dri-opt.is-on { border-color: var(--dri-gold); background: var(--dri-gold-tint); }
.dri-opt.is-disabled { cursor: default; opacity: .7; background: #f8fafc; }
.dri-opt input[type="radio"] { accent-color: var(--dri-gold); width: 18px; height: 18px; margin: 0 0 0 8px; vertical-align: -3px; }
/* two-colour focus ring: navy carries the contrast on white (yellow alone is 1.5:1), yellow keeps it visible on navy */
.dri-opt:focus-within { outline: 3px solid #072a5d; outline-offset: 2px; box-shadow: 0 0 0 7px #f2ce3a; }
.dri-opt-t { font-weight: 800; font-size: 15.5px; }
.dri-badge { display: inline-block; font-size: 12px; font-weight: 800; padding: 1px 9px; border-radius: 99px; background: var(--dri-gold); color: var(--dri-navy); margin-inline-start: 6px; vertical-align: 1px; }
.dri-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 6px; }
.dri-big { font-size: 24px; font-weight: 900; line-height: 1.4; white-space: nowrap; color: var(--dri-ink); }
.dri-big small { font-size: 13px; font-weight: 700; color: var(--dri-muted); }
.dri-big--long { font-size: 17px; line-height: 1.8; white-space: normal; } /* «قسط اول …، سپس N قسط …» wraps on a phone */
.dri-strike { color: var(--dri-muted); font-size: 14px; white-space: nowrap; }
.dri-sub { display: block; font-size: 13.5px; color: var(--dri-muted); line-height: 1.8; margin-top: 2px; }

.dri-body[hidden] { display: none !important; }
.dri-body { display: flex; flex-direction: column; gap: 10px; }
.dri-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dri-chips button { min-width: 44px; min-height: 40px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--dri-line); background: #fff; color: var(--dri-ink); font: inherit; font-weight: 800; cursor: pointer; }
.dri-chips button:hover { border-color: var(--dri-navy); }
.dri-chips button[aria-pressed="true"] { background: var(--dri-navy); color: #fff; border-color: var(--dri-navy); }
.dri-chips button:focus-visible, .dri-cta:focus-visible, .dri-bar-line:focus-visible, .dri-agree input:focus-visible { outline: 3px solid #072a5d; outline-offset: 2px; box-shadow: 0 0 0 7px #f2ce3a; }

ol.dri-sched { list-style: none; margin: 0; padding: 0; font-size: 13.5px; max-height: 300px; overflow: auto; border: 1px solid var(--dri-line); border-radius: 12px; background: #fff; }
ol.dri-sched li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--dri-line); margin: 0; }
ol.dri-sched li:last-child { border-bottom: 0; }
.dri-n { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 12px; color: #fff; background: var(--dri-navy); }
li:first-child > .dri-n { background: var(--dri-gold); color: var(--dri-navy); }
.dri-when { line-height: 1.6; }
.dri-when small { display: block; color: var(--dri-muted); font-size: 12.5px; }
.dri-amt { font-weight: 800; white-space: nowrap; }

.dri-agree { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; line-height: 1.9; margin: 2px 0; }
.dri-agree input { width: 20px; height: 20px; flex: none; accent-color: var(--dri-gold); margin: 4px 0 0; }
.dri-agree a { color: var(--dri-navy); font-weight: 700; text-decoration: underline; }
.dri-cta { justify-content: center; }
.dri-cta:disabled, .dri-cta[aria-disabled="true"] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.dri-cta[aria-disabled="true"]:focus-visible { opacity: .7; box-shadow: 0 0 0 7px #f2ce3a; }
.dri-msg { font-size: 13.5px; line-height: 1.9; margin: 0; min-height: 0; color: var(--dri-navy); }
.dri-msg:empty { display: none; }
.dri-msg.is-error { background: #fff7ed; border: 1px solid #fed7aa; color: #7c2d12; border-radius: 10px; padding: 8px 10px; }
.dri-login { margin-top: 2px; }
/* messages that live outside the option body: the hint after a started checkout, the note when the option went away, the «already yours» card */
.dri-hint, .dri-note { font-size: 13.5px; line-height: 1.9; margin: 0; padding: 8px 10px; border-radius: 10px; background: #eef4ff; border: 1px solid #c7d7f5; color: #072a5d; direction: rtl; text-align: right; }
.dri-note { margin: 0 0 10px; box-sizing: border-box; }
.dri-owned { border: 2px solid var(--dri-gold); border-radius: 14px; padding: 14px; background: var(--dri-gold-tint); }
.dri-owned-t { margin: 0; font-weight: 800; font-size: 15.5px; color: var(--dri-navy); }
.dri-owned .dri-sub { color: #33475b; }
.dri-owned .dri-cta { text-decoration: none; }

/* «از ماهی …» on course cards and under the mobile bar price */
.dri-month { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 700; line-height: 1.6; color: #0b7a52; white-space: nowrap; }
.dri-bar-line { display: block; margin: 0; padding: 6px 0; min-height: 32px; border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 700; color: #0b7a52; text-align: right; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

@media (max-width: 640px) {
  .dri-big { font-size: 21px; }
  ol.dri-sched { max-height: 260px; }
}

/* /installment-terms/ */
.dri-terms-wrap { max-width: 820px; margin: 0 auto; padding: 32px 16px 56px; direction: rtl; text-align: right; font-family: inherit; color: #33475b; }
.dri-terms h1 { font-size: clamp(22px, 3.4vw, 30px); line-height: 1.6; font-weight: 900; color: #072a5d; margin: 0 0 20px; padding-bottom: 14px; border-bottom: 4px solid #d7ae1c; }
.dri-terms-article { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 16px 20px; margin: 0 0 14px; }
.dri-terms-article h2 { font-size: 18px; font-weight: 800; color: #072a5d; margin: 0 0 8px; }
.dri-terms-article ul { margin: 0; padding: 0 20px 0 0; }
.dri-terms-article li { line-height: 2.1; margin: 4px 0; font-size: 15.5px; }
.dri-terms-version { color: #55637a; font-size: 13px; margin: 18px 0 0; }
.dri-terms-old { background: #fff7ed; border: 1px solid #fed7aa; color: #7c2d12; border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; line-height: 2; font-size: 14.5px; }
.dri-terms-back a { color: #072a5d; font-weight: 700; }
body.dri-terms-plain { margin: 0; background: #f7f8fa; font-family: Vazirmatn, Tahoma, sans-serif; }
