/* ===========================================================
   ملف: app/www/css/components.css
   القسم: 8 — المكوّنات المشتركة
   الغرض: الأزرار والبلاطات والشارات وشريط التنقل
   يرتبط بـ: tokens.css · كل صفحات التطبيق
   =========================================================== */

.ico {
  width: 22px;
  height: 22px;
  display: inline-block;
  background: currentColor;
  mask: var(--mask) center / contain no-repeat;
  -webkit-mask: var(--mask) center / contain no-repeat;
}

.ico--home {
  --mask: url("../assets/icons/home.svg");
}

.ico--list {
  --mask: url("../assets/icons/list.svg");
}

.ico--heart {
  --mask: url("../assets/icons/heart.svg");
}

.ico--heart-on {
  --mask: url("../assets/icons/heart-on.svg");
}

.ico--more {
  --mask: url("../assets/icons/more.svg");
}

.ico--search {
  --mask: url("../assets/icons/search.svg");
}

.ico--filter {
  --mask: url("../assets/icons/filter.svg");
}

.ico--phone {
  --mask: url("../assets/icons/phone.svg");
}

.ico--chat {
  --mask: url("../assets/icons/chat.svg");
}

.ico--whatsapp {
  --mask: url("../assets/icons/whatsapp.svg");
}

.ico--check {
  --mask: url("../assets/icons/check.svg");
}

.ico--back {
  --mask: url("../assets/icons/back.svg");
}

.ico--clock {
  --mask: url("../assets/icons/clock.svg");
}

.ico--pin {
  --mask: url("../assets/icons/pin.svg");
}

.ico--globe {
  --mask: url("../assets/icons/globe.svg");
}

.ico--arrow {
  --mask: url("../assets/icons/arrow.svg");
}

.ico--locate {
  --mask: url("../assets/icons/locate.svg");
}

[dir="ltr"] .ico--back,
[dir="ltr"] .ico--arrow {
  transform: scaleX(-1);
}

/* كرات زخرفية مشتركة (الرئيسية وغلاف المكتب) */
.orb {
  position: absolute;
  border-radius: 50%;
}

.orb--blue {
  background: radial-gradient(circle at 35% 30%, var(--blue), var(--navy));
}

.orb--teal {
  background: radial-gradient(circle at 32% 28%, var(--teal-light), var(--teal));
}

.icon-btn {
  width: var(--touch);
  height: var(--touch);
  border-radius: 14px;
  border: 1px solid var(--chip-border);
  background: var(--card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

.icon-btn--glass {
  background: var(--glass);
  border-color: var(--glass-line);
  color: var(--white);
}

.btn {
  min-height: 46px;
  border-radius: var(--r-btn);
  border: 0;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  text-decoration: none;
}

.btn--wa {
  background: var(--wa);
  color: var(--white);
  box-shadow: var(--sh-btn-wa-sm);
}

.btn--navy {
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--sh-btn-navy);
}

.btn--white {
  background: var(--card);
  color: var(--wa);
  border-radius: 15px;
}

.btn--outline {
  background: var(--card);
  color: var(--blue);
  box-shadow: var(--sh-outline);
}

.btn--lg {
  height: 58px;
  width: 100%;
  border-radius: var(--r-btn-lg);
  font-size: 17px;
}

.btn--block {
  flex: 1;
}

.tile {
  border-radius: var(--r-tile);
  background: var(--card);
  box-shadow: var(--sh-tile);
  text-decoration: none;
  color: var(--ink);
}

.tile--navy {
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--sh-tile-navy);
}

.tile--soon {
  opacity: 0.5;
}

.chip {
  height: 40px;
  border-radius: var(--r-chip);
  border: 1px solid var(--chip-border);
  background: var(--card);
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
  flex: none;
}

.chip .ico {
  width: 15px;
  height: 15px;
}

.chip--active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
  box-shadow: var(--sh-btn-navy);
}

.chip select {
  border: 0;
  background: transparent;
  font-weight: 700;
  max-width: 110px;
}

.badge {
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
}

.badge--teal {
  background: var(--teal-light);
  color: var(--teal-text);
}

.badge--blue {
  background: var(--navy-soft);
  color: var(--blue);
}

.card {
  background: var(--card);
  border-radius: var(--r-card);
  box-shadow: var(--sh-card);
}

.field {
  height: 50px;
  border-radius: 16px;
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
}

.field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
}

.nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 32px), calc(var(--app-max) - 32px));
  bottom: 16px;
  height: 68px;
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--sh-nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  z-index: 5;
}

.nav__item {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  gap: 6px;
}

.nav__item--active {
  width: auto;
  padding: 0 14px;
  background: var(--navy);
  color: var(--white);
  font-weight: 700;
  font-size: 13px;
}

.nav__item span:last-child {
  display: none;
}

.nav__item--active span:last-child {
  display: inline;
}