@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&display=swap');

:root {
  --p:  #8B6355; --a: #c4846a; --lt: #f8ede5;
  --bg: #fdf8f5; --wh: #fff;   --br: #e8d5c8;
  --tx: #3d2c26; --mu: #9a8278;
  --gn: #5a9e72; --rd: #b94040;
  --r:  16px; --sh: 0 4px 20px rgba(139,99,85,.10);
}
* { box-sizing: border-box; }

.ys-wrap {
  font-family: 'Tajawal', sans-serif;
  direction: rtl; color: var(--tx);
  max-width: 700px; margin: 0 auto; padding: 16px;
}

/* Header */
.ys-header { text-align: center; margin-bottom: 24px; }
.ys-brand  { font-size: .95rem; font-weight: 800; color: var(--a); margin: 0 0 4px; letter-spacing: 1px; }
.ys-title  { font-size: 1.75rem; font-weight: 800; color: var(--p); margin: 0 0 6px; line-height: 1.2; }
.ys-subtitle { font-size: .95rem; color: var(--mu); margin: 0 0 14px; }
.ys-price-badge {
  display: inline-flex; align-items: baseline; gap: 5px;
  background: linear-gradient(135deg, var(--p), var(--a));
  color: #fff; padding: 9px 26px; border-radius: 40px;
}
.ys-price-n { font-size: 2rem; font-weight: 800; line-height: 1; }
.ys-price-c { font-size: .9rem; font-weight: 600; opacity: .9; }

/* Section */
.ys-section {
  background: var(--wh); border: 1.5px solid var(--br);
  border-radius: var(--r); padding: 20px 18px;
  margin-bottom: 14px; box-shadow: var(--sh);
}
.ys-section-fixed { background: #f5fbf6; border-color: #b8d9c0; }
.ys-sec-hd {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1.5px solid var(--br);
}
.ys-sec-hd h3 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--p); }
.ys-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--p); color: #fff; font-size: .78rem; font-weight: 800; flex-shrink: 0;
}
.ys-num-green { background: var(--gn); }
.ys-req-tag {
  font-size: .72rem; font-weight: 700;
  background: #fff0ec; color: var(--a);
  border: 1px solid var(--a); border-radius: 10px;
  padding: 1px 7px; margin-right: 5px; vertical-align: middle;
}

/* Fields */
.ys-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ys-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.ys-field:last-child { margin-bottom: 0; }
.ys-field label { font-size: .85rem; font-weight: 600; }
.req { color: var(--rd); }
.ys-field input, .ys-field select, .ys-field textarea {
  padding: 9px 12px; border: 1.5px solid var(--br); border-radius: 10px;
  font-family: 'Tajawal', sans-serif; font-size: .93rem; color: var(--tx);
  background: #fff; direction: rtl; transition: border-color .15s; width: 100%;
}
.ys-field input:focus, .ys-field select:focus { outline: none; border-color: var(--a); }
@media (max-width: 540px) { .ys-row { grid-template-columns: 1fr; } }

/* Fixed rows */
.ys-fixed-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid #d4ecd8;
}
.ys-fixed-row:last-child { border: none; }
.ys-fixed-icon { font-size: 1rem; flex-shrink: 0; }
.ys-fixed-row strong { font-size: .75rem; color: var(--mu); display: block; }
.ys-fixed-row span   { font-size: .9rem; font-weight: 600; }

/* Radio cards */
.ys-radio-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
.ys-radio-wrap { grid-template-columns: repeat(auto-fill, minmax(110px,1fr)); }
@media (max-width:540px) { .ys-radio-grid { grid-template-columns: 1fr 1fr; } }

.ys-radio-card { cursor: pointer; }
.ys-radio-card input { display: none; }
.ys-rc-inner {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 13px 8px; border: 2px solid var(--br); border-radius: 12px;
  background: var(--bg); transition: all .15s; text-align: center;
}
.ys-radio-card input:checked + .ys-rc-inner {
  border-color: var(--p); background: var(--lt);
  box-shadow: 0 0 0 3px rgba(139,99,85,.12);
}
.ys-rc-icon { font-size: 1.5rem; line-height: 1; }
.ys-rc-lbl  { font-size: .83rem; font-weight: 600; color: var(--tx); line-height: 1.3; }
.ys-radio-card input:checked + .ys-rc-inner .ys-rc-lbl { color: var(--p); }

/* Summary */
.ys-summary {
  background: linear-gradient(135deg,#fff7f2,#fdeede);
  border: 1.5px solid var(--a); border-radius: var(--r);
  padding: 18px 20px; margin: 18px 0 14px;
}
.ys-sum-row {
  display: flex; justify-content: space-between;
  padding: 5px 0; font-size: .9rem; border-bottom: 1px solid var(--br);
}
.ys-sum-row:last-of-type { border: none; }
.ys-sum-total { font-size: 1.1rem; font-weight: 800; color: var(--p); margin-top: 6px; padding-top: 10px; border-top: 2px solid var(--br) !important; }
.ys-pay-note  { font-size: .8rem; color: var(--mu); margin: 10px 0 0; text-align: center; }

/* Submit */
.ys-btn-submit {
  display: block; width: 100%; padding: 15px; border: none; border-radius: 12px;
  font-family: 'Tajawal',sans-serif; font-size: 1.05rem; font-weight: 800;
  background: linear-gradient(135deg, var(--p), var(--a));
  color: #fff; cursor: pointer; transition: opacity .15s, transform .12s;
}
.ys-btn-submit:hover    { opacity: .92; transform: scale(1.01); }
.ys-btn-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* Messages */
.ys-msg {
  padding: 13px 16px; border-radius: 10px; font-weight: 600;
  font-size: .9rem; margin-bottom: 12px; text-align: center;
}
.ys-msg.error   { background: #fdf0f0; color: var(--rd); border: 1px solid #e8b0b0; }
.ys-msg.success { background: #f0f9f3; color: #2d6e3c; border: 1px solid #b8dcc0; }
