/* ──────────────────────────────────────────────────────────
   ASTRO — الاستشارات والمساعد الذكي
   ──────────────────────────────────────────────────────────
   نافذة الاستشارات التقنية وشات المساعد الذكي.
────────────────────────────────────────────────────────── */

    /* ── Consult Modal ── */
    .consult-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(5,5,15,0.92);
      backdrop-filter: blur(12px);
      z-index: 1000;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }
    .consult-overlay.open { display: flex; }

    .consult-box {
      background: rgba(14,14,30,0.97);
      border: 1px solid rgba(138,77,255,0.3);
      border-radius: 12px;
      padding: 36px;
      width: 100%;
      max-width: 460px;
      text-align: center;
    }

    .consult-title {
      font-family: 'Orbitron', sans-serif;
      font-size: 1rem;
      font-weight: 900;
      letter-spacing: 2px;
      background: linear-gradient(135deg, #fff, #C084FC);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      margin-bottom: 10px;
    }

    .consult-sub {
      font-size: 0.85rem;
      color: rgba(242,242,247,0.5);
      margin-bottom: 32px;
      line-height: 1.7;
    }

    .consult-options {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
      margin-bottom: 20px;
    }

    .consult-opt {
      background: rgba(20,10,40,0.7);
      border: 2px solid rgba(138,77,255,0.2);
      border-radius: 10px;
      padding: 24px 16px;
      cursor: pointer;
      transition: border-color 0.25s, transform 0.2s, box-shadow 0.2s;
      text-decoration: none;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 12px;
    }
    .consult-opt:hover {
      border-color: rgba(138,77,255,0.6);
      transform: translateY(-3px);
      box-shadow: 0 12px 30px rgba(80,20,160,0.3);
    }

    .consult-opt-icon { font-size: 2.2rem; }
    .consult-opt-label {
      font-family: 'Orbitron', sans-serif;
      font-size: 0.7rem;
      font-weight: 700;
      letter-spacing: 1px;
      color: var(--pl);
    }
    .consult-opt-desc {
      font-size: 0.75rem;
      color: rgba(242,242,247,0.5);
      line-height: 1.5;
    }

    .consult-close {
      background: none;
      border: none;
      color: rgba(242,242,247,0.4);
      font-size: 0.8rem;
      cursor: pointer;
      font-family: 'Orbitron', sans-serif;
      letter-spacing: 1px;
      margin-top: 8px;
    }

    /* ── AI Chat ── */
    .ai-chat-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(5,5,15,0.95);
      backdrop-filter: blur(12px);
      z-index: 1001;
      flex-direction: column;
    }
    .ai-chat-overlay.open { display: flex; }

    .ai-chat-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 24px;
      background: rgba(14,14,30,0.9);
      border-bottom: 1px solid rgba(138,77,255,0.2);
      flex-shrink: 0;
    }

    .ai-chat-title {
      font-family: 'Orbitron', sans-serif;
      font-size: 0.85rem;
      font-weight: 700;
      letter-spacing: 2px;
      background: linear-gradient(135deg, #fff, #C084FC);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .ai-chat-back {
      background: rgba(138,77,255,0.12);
      border: 1px solid rgba(138,77,255,0.25);
      border-radius: 6px;
      color: var(--pl);
      font-family: 'Orbitron', sans-serif;
      font-size: 0.65rem;
      letter-spacing: 1px;
      padding: 7px 14px;
      cursor: pointer;
    }

    .ai-chat-messages {
      flex: 1;
      overflow-y: auto;
      padding: 24px;
      display: flex;
      flex-direction: column;
      gap: 16px;
      max-width: 800px;
      width: 100%;
      margin: 0 auto;
    }

    .ai-msg {
      display: flex;
      gap: 12px;
      align-items: flex-start;
    }

    .ai-msg.user { flex-direction: row-reverse; }

    .ai-msg-avatar {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1rem;
      flex-shrink: 0;
    }

    .ai-msg.bot .ai-msg-avatar {
      background: linear-gradient(135deg, #3d1a6e, #8A4DFF);
    }

    .ai-msg.user .ai-msg-avatar {
      background: rgba(138,77,255,0.2);
      border: 1px solid rgba(138,77,255,0.3);
    }

    .ai-msg-bubble {
      max-width: 75%;
      padding: 12px 16px;
      border-radius: 12px;
      font-size: 0.88rem;
      line-height: 1.7;
    }

    .ai-msg.bot .ai-msg-bubble {
      background: rgba(28,14,56,0.8);
      border: 1px solid rgba(138,77,255,0.2);
      color: var(--wh);
      border-radius: 4px 12px 12px 12px;
    }

    .ai-msg.user .ai-msg-bubble {
      background: linear-gradient(135deg, #3d1a6e, #6b2fff);
      color: #fff;
      border-radius: 12px 4px 12px 12px;
    }

    .ai-typing {
      display: none;
      gap: 12px;
      align-items: center;
    }
    .ai-typing.visible { display: flex; }
    .ai-typing-dots {
      display: flex;
      gap: 5px;
      padding: 12px 16px;
      background: rgba(28,14,56,0.8);
      border: 1px solid rgba(138,77,255,0.2);
      border-radius: 4px 12px 12px 12px;
    }
    .ai-typing-dots span {
      width: 7px; height: 7px;
      background: var(--pl);
      border-radius: 50%;
      animation: typing-bounce 1.2s infinite;
    }
    .ai-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
    .ai-typing-dots span:nth-child(3) { animation-delay: 0.4s; }
    @keyframes typing-bounce {
      0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
      30% { transform: translateY(-6px); opacity: 1; }
    }

    .ai-chat-input-area {
      padding: 16px 24px;
      background: rgba(14,14,30,0.9);
      border-top: 1px solid rgba(138,77,255,0.2);
      display: flex;
      gap: 12px;
      max-width: 800px;
      width: 100%;
      margin: 0 auto;
      flex-shrink: 0;
    }

    .ai-chat-input {
      flex: 1;
      background: rgba(10,5,25,0.8);
      border: 1px solid rgba(138,77,255,0.25);
      border-radius: 8px;
      padding: 12px 16px;
      color: var(--wh);
      font-family: 'Cairo', sans-serif;
      font-size: 0.9rem;
      outline: none;
      transition: border-color 0.2s;
      resize: none;
    }
    .ai-chat-input:focus { border-color: var(--pm); }
    .ai-chat-input::placeholder { color: rgba(242,242,247,0.28); }

    .ai-send-btn {
      padding: 12px 20px;
      background: linear-gradient(135deg, #3d1a6e, #8A4DFF);
      border: none;
      border-radius: 8px;
      color: #fff;
      font-size: 1.1rem;
      cursor: pointer;
      transition: opacity 0.2s;
      flex-shrink: 0;
    }
    .ai-send-btn:hover { opacity: 0.85; }
    .ai-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

