/* صفحة التجربة المجانية — إضافات فوق components.css */

.try {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(var(--container-padding) + env(safe-area-inset-bottom));
}

/* ---------- الشريط العلوي ---------- */
.try__bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 40px;
}

.try__logo {
  display: block;
  height: 32px;
  width: auto;
}

.try__back {
  position: absolute;
  inset-inline-start: -8px;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--text-secondary);
  background: none;
  border: 0;
  border-radius: var(--radius-input);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.try__back[hidden] {
  display: none;
}

.try__back svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.try__back:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--brand-gold-ring);
}

/* ---------- شريط التقدم ---------- */
.progress {
  display: flex;
  gap: 6px;
  margin: var(--space-4) 0 var(--space-8);
}

.progress span {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border-default);
  transition: background-color var(--transition);
}

.progress span.is-on {
  background: var(--brand-gold);
}

.progress.is-done {
  visibility: hidden;
}

/* ---------- الخطوات ---------- */
.step[hidden] {
  display: none;
}

.step {
  animation: step-in 220ms ease both;
}

@keyframes step-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.field__error[hidden] {
  display: none;
}

/* ---------- أزرار نوع النشاط ---------- */
.chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.chip {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: var(--space-2) var(--space-3);
  font-family: inherit;
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  line-height: 1.3;
  color: var(--text-primary);
  text-align: center;
  background: var(--bg-surface);
  border: var(--border-width) solid var(--border-default);
  border-radius: var(--radius-btn);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color var(--transition), background-color var(--transition),
    box-shadow var(--transition), transform var(--transition);
}

.chip:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.chip:hover {
  border-color: var(--brand-gold);
}

.chip:active {
  transform: scale(0.985);
}

.chip:focus-visible {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px var(--brand-gold-ring);
}

.chip[aria-pressed='true'] {
  border-color: var(--brand-gold);
  background: var(--bg-page);
  box-shadow: 0 0 0 4px var(--brand-gold-ring);
}

/* ---------- قائمة الخدمات ---------- */
.services {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.service {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.service .input {
  padding: 0 var(--space-3);
}

.service__name {
  flex: 1 1 auto;
  min-width: 0;
}

.service__price {
  flex: 0 0 104px;
  width: 104px;
  text-align: center;
}

.service__remove {
  flex: 0 0 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: var(--input-height);
  padding: 0;
  color: var(--text-secondary);
  background: none;
  border: 0;
  border-radius: var(--radius-input);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--transition), background-color var(--transition);
}

.service__remove:hover,
.service__remove:focus-visible {
  outline: none;
  color: var(--danger);
  background: var(--bg-surface);
}

.service__remove svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.btn-add {
  align-self: flex-start;
  height: 40px;
  padding: 0 var(--space-3);
  margin-top: calc(var(--space-2) * -1);
  font-family: inherit;
  font-size: var(--fs-label);
  font-weight: var(--fw-semibold);
  color: var(--brand-gold-hover);
  background: none;
  border: 0;
  border-radius: var(--radius-input);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.btn-add:hover,
.btn-add:focus-visible {
  outline: none;
  background: var(--bg-surface);
}

.btn-add[hidden] {
  display: none;
}

/* ---------- زر الواتساب وسطر السعر ---------- */
.icon-whatsapp--btn {
  width: 20px;
  height: 20px;
  color: var(--text-on-brand);
}

.price-line--wrap {
  display: block;
  line-height: 1.7;
  text-wrap: balance;
}

/* ---------- شاشة التأكيد ---------- */
.done {
  align-items: center;
  padding-top: var(--space-8);
  text-align: center;
}

.done__mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--brand-gold);
}

.done__mark svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: var(--text-on-brand);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.done .h1:focus {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  .step {
    animation: none;
  }
}
