/* =========================================================
   نسخة مُحاصَرة (scoped) من assets/css/pricing.css — كل قاعدة هنا بادئتها
   .pb-wrap عشان لما الحاسبة تتدمج برمجيًا جوه الصفحة الرئيسية (مش iframe)
   متبوظش تصميم باقي الصفحة (زي .brand أو .eyebrow أو body اللي أسماءها
   موجودة أصلاً بمعنى مختلف فى تصميم الصفحة الرئيسية).
   ========================================================= */
.pb-wrap{
  --paper:      #F6F3EC;
  --paper-line: #DDD6C6;
  --surface:    #FFFFFF;
  --ink:        #16283A;
  --ink-soft:   #55636F;
  --ink-faint:  #8B93998f;

  --gold:       #C08A28;
  --gold-ink:   #7A5715;
  --gold-soft:  #F1E2C2;

  --emerald:    #4D7D85;
  --emerald-ink:#2E525A;
  --emerald-soft: #EAF3F4;

  --stamp:      #C85A42;
  --stamp-soft: #FBEAE4;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --font-display: "Noto Kufi Arabic", "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  --shadow-card: 0 1px 2px rgba(22,40,58,.04), 0 12px 28px -14px rgba(22,40,58,.18);

  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

.pb-wrap *, .pb-wrap *::before, .pb-wrap *::after{ box-sizing: border-box; }
.pb-wrap h1, .pb-wrap h2{ font-family: var(--font-display); font-weight: 700; margin:0; color: var(--ink); }
.pb-wrap button{ font-family: inherit; }
.pb-wrap :focus-visible{ outline: 2px solid var(--gold-ink); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce){
  .pb-wrap *{ animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Layout ---------- */
.pb-wrap .builder{
  display:grid;
  grid-template-columns: 1fr 380px;
  gap: 36px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0;
  align-items: start;
}
@media (max-width: 900px){
  .pb-wrap .builder{ grid-template-columns: 1fr; }
}

/* ---------- Composer head ---------- */
.pb-wrap .eyebrow{
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--gold-ink);
  text-transform: uppercase;
  margin: 0 0 10px;
}
.pb-wrap .composer-head h1{
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.25;
}
.pb-wrap .lede{
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 12px 0 0;
  font-size: 15px;
}

/* ---------- Duration switch ---------- */
.pb-wrap .duration-switch{
  display: inline-flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--paper-line);
  border-radius: 999px;
  padding: 4px;
  margin: 26px 0 30px;
}
.pb-wrap .duration-btn{
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .18s ease, color .18s ease;
}
.pb-wrap .duration-btn:hover{ color: var(--ink); }
.pb-wrap .duration-btn.is-active{ background: var(--ink); color: var(--paper); }

/* ---------- Feature list ---------- */
.pb-wrap .feature-list{
  display: flex;
  flex-direction: column;
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.pb-wrap .feature-row{
  display: grid;
  grid-template-columns: 40px 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--paper-line);
  transition: background .15s ease;
}
.pb-wrap .feature-row:last-child{ border-bottom: none; }
.pb-wrap .feature-row:hover{ background: #FBFAF6; }
.pb-wrap .feature-row.is-active{ background: var(--emerald-soft); }
.pb-wrap .feature-row.is-blocked{ opacity: .55; }

.pb-wrap .feature-icon{
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink-soft);
  flex-shrink: 0;
}
.pb-wrap .feature-icon svg{ width: 20px; height: 20px; }
.pb-wrap .feature-row.is-active .feature-icon{ background: var(--emerald); color: var(--paper); }

.pb-wrap .feature-info{ display:flex; flex-direction:column; gap: 2px; min-width: 0; }
.pb-wrap .feature-name{ font-weight: 600; font-size: 15px; }
.pb-wrap .feature-included-badge{display:inline-block;font-size:10px;font-weight:700;color:#16a34a;background:#dcfce7;border-radius:8px;padding:2px 8px;margin-right:8px;vertical-align:middle}
.pb-wrap .feature-row.is-fixed{ background: #FBFAF6; }
.pb-wrap .feature-fixed-tag{
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--emerald-soft); color: var(--emerald); font-size: 16px;
}
.pb-wrap .feature-desc{ font-size: 12.5px; color: var(--ink-soft); }
.pb-wrap .feature-blocked-note{ font-size: 12px; color: var(--stamp); margin-top: 2px; }

.pb-wrap .feature-unit-price{
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-faint);
  white-space: nowrap;
  display: none;
}
@media (min-width: 620px){
  .pb-wrap .feature-unit-price{ display: inline; }
}

/* Toggle switch */
.pb-wrap .switch{
  width: 46px; height: 26px;
  border-radius: 999px;
  border: 1px solid var(--paper-line);
  background: var(--paper);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .18s ease, border-color .18s ease;
}
.pb-wrap .switch-knob{
  position: absolute;
  top: 2px; right: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0,0,0,.25);
  transition: transform .18s ease;
}
.pb-wrap .switch[aria-checked="true"]{ background: var(--emerald); border-color: var(--emerald); }
.pb-wrap .switch[aria-checked="true"] .switch-knob{ transform: translateX(-20px); }

/* Stepper */
.pb-wrap .stepper{
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--paper-line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--paper);
  flex-shrink: 0;
}
.pb-wrap .stepper-btn{
  width: 32px; height: 32px;
  border: none;
  background: transparent;
  font-size: 17px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
}
.pb-wrap .stepper-btn:hover{ background: var(--gold-soft); }
.pb-wrap .stepper-value{
  min-width: 30px;
  text-align: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 14px;
}

/* ---------- Receipt ---------- */
.pb-wrap .receipt-wrap{ position: relative; }
.pb-wrap .receipt-card{
  position: sticky;
  top: 24px;
  background: var(--surface);
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: var(--shadow-card);
  padding: 26px 24px 30px;
  overflow: hidden;
}
@media (max-width: 900px){
  .pb-wrap .receipt-card{ position: static; }
}

.pb-wrap .receipt-head{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: 16px;
  margin-bottom: 14px;
  border-bottom: 1px dashed var(--paper-line);
}
.pb-wrap .receipt-brand{ font-family: var(--font-display); font-weight: 800; font-size: 17px; }
.pb-wrap .receipt-sub{ font-size: 12.5px; color: var(--ink-soft); font-family: var(--font-mono); }

.pb-wrap .receipt-lines{ display: flex; flex-direction: column; gap: 10px; min-height: 40px; }
.pb-wrap .receipt-empty{ color: var(--ink-faint); font-size: 13.5px; text-align: center; padding: 14px 0; margin: 0; }

.pb-wrap .receipt-line{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13.5px;
  animation: pb-line-in .25s ease;
}
.pb-wrap .receipt-line .rl-name{ color: var(--ink); }
.pb-wrap .receipt-line .rl-meta{ display:block; font-size: 11px; color: var(--ink-faint); }
.pb-wrap .receipt-line .rl-amount{ font-family: var(--font-mono); font-weight: 600; white-space: nowrap; }

@keyframes pb-line-in{
  from{ opacity: 0; transform: translateY(-4px); }
  to{ opacity: 1; transform: translateY(0); }
}

.pb-wrap .receipt-total-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--paper-line);
  font-weight: 600;
}

.pb-wrap .receipt-stamp{
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--stamp);
  border: 2px dashed var(--stamp-soft);
  border-radius: 10px;
  padding: 4px 12px;
  transform: rotate(-2deg);
}
.pb-wrap .receipt-stamp small{ font-size: 12px; font-weight: 500; }

.pb-wrap .btn-confirm{
  width: 100%;
  margin-top: 20px;
  padding: 13px 18px;
  border: none;
  border-radius: 999px;
  background: var(--emerald);
  color: var(--paper);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background .18s ease, transform .1s ease;
}
.pb-wrap .btn-confirm:hover:not(:disabled){ background: var(--emerald-ink); }
.pb-wrap .btn-confirm:active:not(:disabled){ transform: scale(.98); }
.pb-wrap .btn-confirm:disabled{ background: var(--paper-line); color: var(--ink-faint); cursor: not-allowed; }

.pb-wrap .receipt-note{ font-size: 11.5px; color: var(--ink-faint); text-align: center; margin: 10px 0 0; }

.pb-wrap .receipt-tear{
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 16px;
  background-image:
    linear-gradient(135deg, transparent 8px, var(--paper) 8px),
    linear-gradient(-135deg, transparent 8px, var(--paper) 8px);
  background-size: 16px 16px;
  background-position: bottom right;
  background-repeat: repeat-x;
}
