/* ====================================================================
   onboarding-assistant.css
   محتوى لوحة «مساعد الإعداد» (robot.js): شريط التقدّم، الرسائل،
   الاختيارات، وأزرار الرجوع السريع. يُحمَّل بعد robot.css ويستخدم
   توكنزه (--ra-*) فيتبع الوضع الليلي/النهاري للصفحة.
   ==================================================================== */

.speech-bubble.assistant-mode { padding: 0; }

.bubble-close {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--ra-text-2);
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.bubble-close:hover { background: var(--ra-surface-2); color: var(--ra-text); }
.bubble-close:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(0, 119, 204, 0.3); }
.bubble-close svg { width: 16px; height: 16px; }

/* شريط تقدّم مقسّم أعلى الرسائل */
.robot-progress {
    display: flex;
    gap: 4px;
    padding: 0 14px 12px;
    flex-shrink: 0;
}
.robot-progress i {
    flex: 1;
    height: 4px;
    border-radius: 4px;
    background: var(--ra-surface-2);
    overflow: hidden;
}
.robot-progress i span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--ra-accent);
    transition: width .4s ease;
}
.robot-progress i.done span,
.robot-progress i.active span { width: 100%; }
.robot-progress i.active span { opacity: .55; }

/* المحادثة */
.robot-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px 14px;
    border-top: 1px solid var(--ra-border);
    background: var(--ra-surface-2);
    scrollbar-width: thin;
}

.robot-msg {
    align-self: flex-start;
    max-width: 92%;
    padding: 9px 12px;
    border-radius: 14px;
    border-end-start-radius: 5px;
    background: var(--ra-surface);
    border: 1px solid var(--ra-border);
    color: var(--ra-text);
    font-size: 13.5px;
    line-height: 1.75;
    animation: raMsgIn .22s ease;
}

@keyframes raMsgIn {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: none; }
}

.robot-typing {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--ra-surface);
    border: 1px solid var(--ra-border);
}
.robot-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ra-text-2);
    opacity: .5;
    animation: raDot 1.1s infinite ease-in-out;
}
.robot-typing span:nth-child(2) { animation-delay: .15s; }
.robot-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes raDot {
    0%, 60%, 100% { transform: translateY(0); opacity: .45; }
    30% { transform: translateY(-3px); opacity: 1; }
}

/* الاختيارات */
.robot-choices {
    align-self: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 100%;
}

.robot-choice-btn {
    min-height: 34px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--ra-border);
    background: var(--ra-surface);
    color: var(--ra-accent);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}
.robot-choice-btn.primary { background: var(--ra-accent); border-color: var(--ra-accent); color: #fff; }
.robot-choice-btn:hover:not(:disabled) { border-color: var(--ra-accent); }
.robot-choice-btn.primary:hover:not(:disabled) { filter: brightness(1.06); }
.robot-choice-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(0, 119, 204, 0.3); }
.robot-choice-btn:disabled { opacity: .5; cursor: not-allowed; }

/* أزرار الرجوع السريع */
.robot-quick-actions { align-self: stretch; display: flex; flex-direction: column; gap: 6px; }
.robot-quick-actions button {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--ra-border);
    background: var(--ra-surface);
    color: var(--ra-text);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    text-align: start;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.robot-quick-actions button:hover { border-color: var(--ra-accent); }
.robot-quick-actions button:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(0, 119, 204, 0.3); }
.robot-quick-actions svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--ra-accent); }

@media (prefers-reduced-motion: reduce) {
    .robot-msg, .robot-typing span { animation: none; }
    .robot-progress i span { transition: none; }
}
