/* ==========================================================================
   نموذج حجز تلاقي — يرث ألوان القالب، ويعمل مستقلاً إن لم يوجد
   ========================================================================== */

.tbk {
  --tbk-ivory: var(--ivory, #f3efec);
  --tbk-green: var(--green, #184441);
  --tbk-gold:  var(--gold, #c89f52);
  --tbk-ink:   var(--ink, #2d2d2d);
  --tbk-line:  rgba(24, 68, 65, .16);

  max-width: 820px;
  width: 100%;
  margin-inline: auto;
  box-sizing: border-box;
  font-family: var(--ff-body, inherit);
}

/* ---------------------------------------------------------- خطوات النموذج */
.tbk__step {
  border: 1px solid var(--tbk-line);
  border-radius: 2px;
  padding: 30px 26px 26px;
  margin: 0 0 20px;
  background: #fff;
}

.tbk__legend {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px;
  font-size: 1.18rem;
  color: var(--tbk-green);
  font-family: var(--ff-display, inherit);
}

.tbk__step-num {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--tbk-green);
  color: var(--tbk-ivory);
  border-radius: 50%;
  font-size: .88rem;
  flex-shrink: 0;
}

/* ------------------------------------------------------------ اختيار الباقة */
.tbk__packages {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 700px) {
  .tbk__packages { grid-template-columns: 1fr; }
}

.tbk__pkg { cursor: pointer; display: block; }

.tbk__pkg input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.tbk__pkg-box {
  display: block;
  text-align: center;
  padding: 22px 14px;
  border: 1px solid var(--tbk-line);
  border-radius: 2px;
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
}

.tbk__pkg:hover .tbk__pkg-box { border-color: var(--tbk-gold); transform: translateY(-2px); }

.tbk__pkg input:checked + .tbk__pkg-box {
  border-color: var(--tbk-green);
  background: var(--tbk-green);
  color: var(--tbk-ivory);
}
.tbk__pkg input:checked + .tbk__pkg-box .tbk__pkg-price { color: var(--tbk-gold); }

.tbk__pkg input:focus-visible + .tbk__pkg-box {
  outline: 2px solid var(--tbk-gold);
  outline-offset: 3px;
}

.tbk__pkg-name  { display: block; font-size: 1.06rem; margin-bottom: 8px; }
.tbk__pkg-price { display: block; font-size: 1.5rem; color: var(--tbk-green); line-height: 1.2; }
.tbk__pkg-price small { font-size: .72rem; }
.tbk__pkg-count { display: block; font-size: .8rem; opacity: .65; margin-top: 6px; }

/* ------------------------------------------------------------------ الحقول */
.tbk__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 700px) {
  .tbk__row { grid-template-columns: 1fr; }
}

.tbk__field { margin-bottom: 18px; }
.tbk__row .tbk__field { margin-bottom: 0; }

.tbk__field label {
  display: block;
  margin-bottom: 8px;
  font-size: .96rem;
  color: var(--tbk-green);
}

.tbk__opt { opacity: .55; font-size: .85em; }

.tbk__field input,
.tbk__field select,
.tbk__field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--tbk-line);
  border-radius: 2px;
  background: var(--tbk-ivory);
  color: var(--tbk-ink);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color .25s ease, background .25s ease;
}

.tbk__field input:focus,
.tbk__field select:focus,
.tbk__field textarea:focus {
  outline: none;
  border-color: var(--tbk-gold);
  background: #fff;
}

.tbk__field textarea { resize: vertical; min-height: 90px; }

.tbk__field input[aria-invalid="true"],
.tbk__field select[aria-invalid="true"] {
  border-color: #c0392b;
  background: #fdf3f2;
}

.tbk__hint {
  margin: 8px 0 0;
  font-size: .88rem;
  min-height: 1.2em;
}
.tbk__hint--ok   { color: #1e7d55; }
.tbk__hint--warn { color: #b8860b; }
.tbk__hint--busy { color: rgba(45, 45, 45, .5); }

/* مصيدة السبام */
.tbk__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ------------------------------------------------------------------ الإرسال */
.tbk__actions { text-align: center; padding-top: 8px; }

.tbk__submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: min(250px, 100%);
  max-width: 100%;
  padding: 16px 40px;
  border: 0;
  border-radius: 2px;
  background: var(--tbk-gold);
  color: #fff;
  font-family: inherit;
  font-size: 1.06rem;
  cursor: pointer;
  transition: background .25s ease, transform .2s ease;
}
.tbk__submit:hover:not(:disabled) { background: #b88d42; transform: translateY(-2px); }
.tbk__submit:disabled { opacity: .6; cursor: not-allowed; }

.tbk__spinner {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: tbk-spin .7s linear infinite;
}
.tbk__submit[data-loading="true"] .tbk__spinner { display: block; }

@keyframes tbk-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .tbk__spinner { animation-duration: 1.6s; }
  .tbk__submit:hover:not(:disabled) { transform: none; }
}

.tbk__note {
  margin: 16px 0 0;
  font-size: .9rem;
  color: rgba(45, 45, 45, .62);
}

.tbk__alert {
  margin: 20px 0 0;
  padding: 14px 18px;
  border-radius: 2px;
  background: #fdf3f2;
  border: 1px solid #e4b5ae;
  color: #a03226;
  font-size: .96rem;
  text-align: center;
}

/* ------------------------------------------------------------- شاشة النجاح */
.tbk__done {
  text-align: center;
  padding: 60px 30px;
  background: var(--tbk-green);
  color: var(--tbk-ivory);
  border-radius: 2px;
}

.tbk__done-mark {
  width: 66px;
  height: 66px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
  border: 2px solid var(--tbk-gold);
  border-radius: 50%;
  color: var(--tbk-gold);
  font-size: 1.9rem;
}

.tbk__done-title {
  font-family: var(--ff-display, inherit);
  font-weight: 200;
  font-size: 1.9rem;
  margin: 0 0 12px;
}

.tbk__done-text {
  margin: 0 auto 30px;
  max-width: 44ch;
  color: rgba(243, 239, 236, .8);
}

.tbk__wa {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 34px;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  border-radius: 2px;
  font-size: 1.04rem;
  transition: transform .2s ease, background .25s ease;
}
.tbk__wa:hover { background: #1fb855; transform: translateY(-2px); }

.tbk__done-hint {
  margin: 18px 0 0;
  font-size: .86rem;
  color: rgba(243, 239, 236, .55);
}

/* ------------------------------------------------------- موافقة نشر الفيديو */
.tbk__consent {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-top: 6px;
  padding: 16px 18px;
  border: 1px dashed var(--tbk-line);
  border-radius: 2px;
  cursor: pointer;
  transition: border-color .25s ease, background .25s ease;
}
.tbk__consent:hover { border-color: var(--tbk-gold); background: rgba(200, 159, 82, .05); }

.tbk__consent input { position: absolute; opacity: 0; width: 0; height: 0; }

.tbk__consent-box {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border: 1px solid var(--tbk-line);
  border-radius: 2px;
  background: var(--tbk-ivory);
  position: relative;
  transition: background .2s ease, border-color .2s ease;
}
.tbk__consent-box::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: .82rem;
  opacity: 0;
  transition: opacity .2s ease;
}
.tbk__consent input:checked + .tbk__consent-box {
  background: var(--tbk-green);
  border-color: var(--tbk-green);
}
.tbk__consent input:checked + .tbk__consent-box::after { opacity: 1; }
.tbk__consent input:focus-visible + .tbk__consent-box {
  outline: 2px solid var(--tbk-gold);
  outline-offset: 3px;
}

.tbk__consent-text { font-size: .95rem; line-height: 1.6; }
.tbk__consent-text small {
  display: block;
  margin-top: 3px;
  font-size: .82rem;
  opacity: .6;
}

/* ------------------------------------------------------------ نموذج التقييم */
.tbk-rate { max-width: 620px; }

.tbk-rate__head { text-align: center; margin-bottom: 26px; }
.tbk-rate__title {
  font-family: var(--ff-display, inherit);
  font-weight: 200;
  font-size: 1.7rem;
  color: var(--tbk-green);
  margin: 0 0 8px;
}
.tbk-rate__sub { margin: 0; font-size: .94rem; opacity: .7; }

/* النجوم: مرتبة من 5 إلى 1 في DOM ليعمل التظليل بـ ~ في RTL */
.tbk-stars {
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  gap: 6px;
  margin-bottom: 26px;
}
.tbk-stars input { position: absolute; opacity: 0; width: 0; height: 0; }

.tbk-stars label {
  font-size: 2.4rem;
  line-height: 1;
  color: var(--tbk-line);
  cursor: pointer;
  transition: color .18s ease, transform .18s ease;
}
.tbk-stars label:hover { transform: scale(1.12); }

.tbk-stars input:checked ~ label { color: var(--tbk-gold); }
.tbk-stars label:hover,
.tbk-stars label:hover ~ label { color: var(--tbk-gold); }

.tbk-stars input:focus-visible + label {
  outline: 2px solid var(--tbk-gold);
  outline-offset: 3px;
}

.tbk-rate .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}


/* الأزرار فقط تبقى كبسولية */
.tbk__submit, .tbk__wa, .tbk-rate__submit {
  border-radius: 100px;
}

/* الأرقام إنكليزية */
.tbk__pkg-price, .tbk__hint, input, select, textarea {
  font-feature-settings: "lnum" 1, "tnum" 1;
  font-variant-numeric: lining-nums tabular-nums;
}
.tbk__pkg-price { unicode-bidi: plaintext; }
