/* =========================================================
   مساعد توفير بذكاء - زر عائم + نافذة اختيارات موجّهة
   ========================================================= */

/* زر مدمج (دائرة صغيرة) لضمان عدم تغطية أي محتوى تحته مهما كان طول الصفحة؛
   الاسم الكامل يظهر كتلميح عند تمرير الفأرة على الكمبيوتر، ومتاح دائمًا لقارئ الشاشة */
.assistant-fab {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--navy-dark);
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: 13px;
  max-width: 54px;
  overflow: hidden;
  font-family: inherit;
  font-size: .92rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, max-width .25s ease, padding-left .25s ease, padding-right .25s ease;
}
.assistant-fab:hover,
.assistant-fab:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(6, 20, 38, .28);
}
@media (hover: hover) and (pointer: fine) {
  .assistant-fab:hover, .assistant-fab:focus-visible { max-width: 230px; padding-inline-end: 18px; }
}

.assistant-fab-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  color: var(--navy-dark);
  border-radius: 50%;
  font-size: .95rem;
}

.assistant-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 20, 38, .55);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.assistant-overlay.open { display: flex; }

.assistant-modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 460px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 22px;
  box-shadow: var(--shadow-lg);
  animation: assistant-pop .18s ease;
}
@keyframes assistant-pop {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.assistant-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}
.assistant-modal-header h3 { margin: 0; color: var(--navy-dark); font-size: 1.15rem; }

.assistant-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-gray);
  cursor: pointer;
  padding: 2px 6px;
  flex-shrink: 0;
}
.assistant-close:hover { color: var(--navy-dark); }

.assistant-subtitle { color: var(--text-gray); font-size: .88rem; margin: 0 0 16px; }

.assistant-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: right;
  background: var(--bg-light);
  border: 1px solid #efe9da;
  border-radius: var(--radius-md);
  padding: 11px 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
  color: inherit;
  text-decoration: none;
}
.assistant-choice:last-child { margin-bottom: 0; }
.assistant-choice:hover { border-color: var(--gold); background: #fbf8f0; }

.assistant-choice-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--navy-dark), var(--blue-deep));
  color: var(--gold);
  border-radius: 10px;
  font-size: 1.1rem;
}

.assistant-choice-text strong { display: block; color: var(--navy-dark); font-size: .93rem; margin-bottom: 2px; }
.assistant-choice-text span { display: block; color: var(--text-gray); font-size: .78rem; line-height: 1.5; }

@media (max-width: 480px) {
  .assistant-fab-label { display: none; }
  .assistant-fab { padding: 13px; }
}

@media (max-width: 600px) {
  .assistant-overlay { align-items: flex-end; padding: 0; }
  .assistant-modal {
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 80vh;
  }
}
