/* KSA DALIL — اختيار خدمات القسم في نموذج التسجيل.
   نفس ألوان وقياسات النموذج الموجودة في index-*.css بالظبط،
   في ملف مستقل عشان ملف الستايل الأساسي يفضل زي ما هو. */

.ks-svc-pick {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 2px;
}

.ks-svc-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ks-svc-head strong {
  color: #527071;
  font-size: 8px;
  font-weight: 850;
}

.ks-svc-head small {
  color: #8aa0a1;
  font-size: 6.5px;
  font-weight: 700;
}

.ks-svc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.ks-svc-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 9px;
  color: #6f8586;
  background: #f7fbfa;
  border: 1px solid #dfebe8;
  border-radius: 9px;
  font-size: 7.5px;
  font-weight: 800;
  line-height: 1.5;
  cursor: pointer;
}

.ks-svc-chip input {
  flex: none;
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: #078f83;
}

.ks-svc-chip.is-on {
  color: #087b70;
  background: #eaf9f5;
  border-color: #08a99a;
  box-shadow: 0 0 0 2px #08a99a1a;
}

.ks-price-was {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 9px;
  color: #a07b1f;
  background: #fdf6e3;
  border-radius: 999px;
  font-size: 6.5px;
  font-weight: 900;
}

@media (max-width: 560px) {
  .ks-svc-grid {
    grid-template-columns: 1fr;
  }
}

/* الاسم العربي أعرض من اللاتيني بـ 33%، فبيزحم الهيدر على الموبايل.
   القياسات دي بترجّع نفس مساحة التصميم الأصلي بالظبط. */
@media (max-width: 480px) {
  .ks-brand-copy strong {
    font-size: 12px !important;
    letter-spacing: 0 !important;
  }
  .ks-business-gateway {
    min-width: 104px !important;
  }
}

/* أعمدة الهيدر كانت مقاسات ثابتة أضيق من محتواها، فالأزرار كانت
   تركب على اللوجو على شاشات الموبايل. دي بتخلي كل عمود ياخد مقاسه. */
.ks-site-header {
  grid-template-columns: auto minmax(0, 1fr) auto;
}
@media (max-width: 399px) {
  .ks-brand-copy strong {
    font-size: 11px !important;
    letter-spacing: 0 !important;
  }
  .ks-business-gateway {
    min-width: 92px !important;
  }
  .ks-header-actions {
    gap: 2px !important;
  }
  .ks-square-button,
  .ks-member-login-icon,
  .ks-notification-button {
    width: 30px !important;
    height: 30px !important;
  }
}

/* زرار "شركات مميزة" في الرئيسية — بعرض كامل وبذهب الهوية.
   نفس التدرّج المستخدم في تصميم المقالات عشان اللون واحد في الموقع كله. */
.ks-featured-tabs {
  display: block;
}
.ks-featured-tabs button {
  position: relative;
  width: 100%;
  min-height: 49px;
  border: 1px solid #e0b63e;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff3b7, #e5b439);
  color: #4e3800;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.01em;
  box-shadow: 0 7px 14px rgba(211, 163, 43, 0.2);
}
.ks-featured-tabs button.is-active {
  background: linear-gradient(135deg, #ffe98a, #d9a92b);
  border-color: #c9982a;
  color: #3f2d00;
  box-shadow: 0 8px 18px rgba(190, 145, 30, 0.28);
}
.ks-featured-tabs button.is-active.is-diamond {
  background: linear-gradient(135deg, #596bda, #9565dc);
  border-color: #7868da;
  color: #fff;
}

/* شريط "ثبّت التطبيق" — إطار أحمر شفاف بوميض، وزر أحمر */
.ksa-install-bar {
  position: fixed;
  inset-inline: 14px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 96px);
  z-index: 9990;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  border: 1.5px solid rgba(214, 45, 66, 0.85);
  font-family: Cairo, Tajawal, Arial, sans-serif;
  direction: rtl;
  animation:
    ksa-install-in 0.28s ease-out both,
    ksa-install-glow 1.9s ease-in-out 0.28s infinite;
}
@keyframes ksa-install-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes ksa-install-glow {
  0%,
  100% {
    box-shadow:
      0 5px 16px rgba(189, 41, 71, 0.16),
      0 0 0 0 rgba(214, 45, 66, 0.42);
    border-color: rgba(214, 45, 66, 0.85);
  }
  50% {
    box-shadow:
      0 5px 16px rgba(189, 41, 71, 0.16),
      0 0 0 6px rgba(214, 45, 66, 0);
    border-color: rgba(214, 45, 66, 0.45);
  }
}
.ksa-install-txt {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1 1 auto;
  min-width: 0;
}
.ksa-install-txt strong {
  color: #12403c;
  font-size: 9.5px;
  font-weight: 900;
  line-height: 1.3;
}
.ksa-install-txt small {
  color: #62807d;
  font-size: 7.5px;
  font-weight: 700;
  line-height: 1.3;
}
.ksa-install-go {
  flex: none;
  border: 1px solid #a81f38;
  border-radius: 9px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #e84e60, #bd2947);
  color: #fff;
  font-family: inherit;
  font-size: 9px;
  font-weight: 950;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(189, 41, 71, 0.3);
}
.ksa-install-go:active {
  transform: translateY(1px);
}
.ksa-install-x {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  cursor: pointer;
  border: 1px solid rgba(214, 45, 66, 0.35);
  background: rgba(255, 255, 255, 0.9);
  color: #b03047;
  font-size: 10px;
  line-height: 1;
  font-family: inherit;
}
@media (min-width: 700px) {
  .ksa-install-bar {
    inset-inline: auto 18px;
    bottom: 18px;
    max-width: 310px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ksa-install-bar {
    animation: ksa-install-in 0.28s ease-out both;
    box-shadow:
      0 5px 16px rgba(189, 41, 71, 0.16),
      0 0 0 3px rgba(214, 45, 66, 0.3);
  }
}

/* شريط التنقل السفلي:
   - touch-action:manipulation بيمنع تكبير الصفحة بالضغطتين، وده اللي
     كان بيخلي زرار "أضف نشاطك" يكبر ويطلع لفوق عند الضغط.
   - safe-area عشان ما يقعش تحت شريط إيماءات النظام. */
.ks-bottom-nav,
.ks-bottom-nav > button {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.ks-bottom-nav > button:focus {
  outline: none;
}
.ks-bottom-nav > button:focus-visible {
  outline: 2px solid #08a99a;
  outline-offset: 2px;
  border-radius: 12px;
}
@supports (padding: env(safe-area-inset-bottom)) {
  .ks-bottom-nav {
    bottom: calc(5px + env(safe-area-inset-bottom, 0px));
  }
}

/* زرار "أضف نشاطك" — الدايرة البارزة الأصلية، مع وميض حواليها. */
.ks-bottom-nav > button.is-add > span {
  animation: ksa-add-pulse 2.1s ease-in-out infinite;
}
@keyframes ksa-add-pulse {
  0%,
  100% {
    box-shadow:
      0 9px 18px rgba(8, 169, 154, 0.24),
      0 0 0 0 rgba(8, 169, 154, 0.45);
  }
  55% {
    box-shadow:
      0 9px 18px rgba(8, 169, 154, 0.24),
      0 0 0 9px rgba(8, 169, 154, 0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ks-bottom-nav > button.is-add > span {
    animation: none;
    box-shadow:
      0 9px 18px rgba(8, 169, 154, 0.24),
      0 0 0 4px rgba(8, 169, 154, 0.25);
  }
}

/* لون مميز لكل قسم في الشريط السفلي.
   الترتيب في الكود: الرئيسية · المفضلة · أضف نشاطك · الشركات · المزيد */
.ks-bottom-nav > button:nth-child(1) > span {
  background: #e7f7f4;
}
.ks-bottom-nav > button:nth-child(1) svg {
  color: #08a99a;
}
.ks-bottom-nav > button:nth-child(1) small {
  color: #0b6f66;
}

.ks-bottom-nav > button:nth-child(2) > span {
  background: #fdeef3;
}
.ks-bottom-nav > button:nth-child(2) svg {
  color: #d9496f;
}
.ks-bottom-nav > button:nth-child(2) small {
  color: #a8304f;
}

.ks-bottom-nav > button:nth-child(4) > span {
  background: #eaf1fd;
}
.ks-bottom-nav > button:nth-child(4) svg {
  color: #3b74d6;
}
.ks-bottom-nav > button:nth-child(4) small {
  color: #2b57a5;
}

.ks-bottom-nav > button:nth-child(5) > span {
  background: #fdf4e0;
}
.ks-bottom-nav > button:nth-child(5) svg {
  color: #c08a1e;
}
.ks-bottom-nav > button:nth-child(5) small {
  color: #8f6319;
}

.ks-bottom-nav > button small {
  font-weight: 900;
}
/* القسم المفتوح حاليًا يفضل أوضح من الباقي */
.ks-bottom-nav > button.is-active > span {
  box-shadow: inset 0 0 0 1.5px currentColor;
}

/* لوحة الاختيار بهوية الموقع */
.ksa-sheet {
  position: fixed;
  inset: 0;
  z-index: 9995;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-family: Cairo, Tajawal, Arial, sans-serif;
  direction: rtl;
}
.ksa-sheet-back {
  position: absolute;
  inset: 0;
  background: rgba(6, 45, 44, 0.42);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.ksa-sheet.is-open .ksa-sheet-back {
  opacity: 1;
}
.ksa-sheet-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 74vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #ffffff, #f4fbfa);
  border: 1px solid #cfe8e2;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -14px 40px rgba(9, 60, 58, 0.22);
  transform: translateY(16px);
  opacity: 0;
  transition:
    transform 0.22s cubic-bezier(0.2, 0.8, 0.3, 1),
    opacity 0.22s ease;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.ksa-sheet.is-open .ksa-sheet-card {
  transform: none;
  opacity: 1;
}
.ksa-sheet-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid #e4f0ed;
}
.ksa-sheet-head strong {
  flex: 1;
  color: #0f3b38;
  font-size: 14px;
  font-weight: 900;
}
.ksa-sheet-x {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid #d9e9e5;
  background: #fff;
  color: #5f807c;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}
.ksa-sheet-list {
  overflow-y: auto;
  padding: 8px 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  -webkit-overflow-scrolling: touch;
}
.ksa-sheet-op {
  width: 100%;
  text-align: right;
  padding: 13px 14px;
  border-radius: 13px;
  cursor: pointer;
  border: 1px solid #e2eeeb;
  background: #fff;
  color: #2c4d4a;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 800;
}
.ksa-sheet-op:active {
  background: #f1faf8;
}
.ksa-sheet-op.is-on {
  color: #07756c;
  background: #e9f8f4;
  border-color: #57c9b8;
  box-shadow: 0 0 0 2px rgba(8, 169, 154, 0.14);
}
.ksa-sheet-op.is-on:after {
  content: "✓";
  float: left;
  font-weight: 900;
  color: #08a99a;
}
@media (min-width: 700px) {
  .ksa-sheet {
    align-items: center;
  }
  .ksa-sheet-card {
    border-radius: 20px;
    max-height: 66vh;
  }
}

/* إصلاح جذري لمشكلة نطّ الشريط عند الضغط على الموبايل:
   السبب الحقيقي مش حساب الشاشة (جُرّب واتلغى) — السبب إن الشريط
   position:fixed ومعاه backdrop-filter:blur(18px)، وده تركيب معروف
   إنه بيخلي كروم بالموبايل يعيد رسم الطبقة من الصفر لما شريط العنوان
   يظهر/يختفي بعد أي ضغطة، فتبان وكأنها نطّة. الخلفية أصلاً شبه معتمة
   (94%) فمفيش فرق يُذكر في الشكل من غير التمويه. */
.ks-bottom-nav {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
