/* Explain: Styles for the quick consultation assistant UI elements. */
/* ---------- Quick consultation assistant ---------- */
.assistant-fab {
    position: fixed;
    bottom: 1.25rem;
    inset-inline-end: 1.25rem;
    z-index: 75;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.9rem 1.4rem;
    border: 1px solid var(--primary-color);
    border-radius: var(--radius-pill);
    background: var(--primary-color);
    color: var(--on-primary);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.98rem;
    cursor: pointer;
    box-shadow: var(--shadow-lime);
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.assistant-fab:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
}

.assistant-fab i {
    font-size: 1.05rem;
}

.assistant-fab.is-open {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-lime);
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.assistant-panel {
    position: fixed;
    bottom: 5.5rem;
    inset-inline-end: 1rem;
    z-index: 76;
    display: none;
    flex-direction: column;
    width: min(23rem, calc(100vw - 2rem));
    max-height: min(32rem, calc(100vh - 8rem));
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.assistant-panel.is-open {
    display: flex;
    animation: assistant-rise 0.25s ease;
}

@keyframes assistant-rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.assistant-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.15rem;
    background: linear-gradient(120deg, #14301c, #0e1a14);
    border-bottom: 1px solid var(--border-color);
    color: #ffffff;
}

.assistant-title {
    display: block;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.05rem;
    color: #ffffff;
}

.assistant-sub {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.assistant-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary-color);
    font-size: 1rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.assistant-close:hover {
    background: rgba(200, 247, 81, 0.12);
    border-color: var(--border-lime);
}

.assistant-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    background: var(--background-color);
}

.assistant-msg {
    max-width: 90%;
    padding: 0.7rem 0.95rem;
    border-radius: 1rem;
    font-size: 0.94rem;
    line-height: 1.75;
}

.assistant-msg-bot {
    align-self: flex-start;
    background: var(--surface-2-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-end-start-radius: 0.35rem;
}

.assistant-msg-user {
    align-self: flex-end;
    background: var(--primary-color);
    color: var(--on-primary);
    font-weight: 700;
    border-end-end-radius: 0.35rem;
}

.assistant-msg-note {
    align-self: stretch;
    max-width: 100%;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #f7d08a;
    font-size: 0.86rem;
    line-height: 1.7;
}

.assistant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.1rem;
}

.assistant-option {
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid var(--border-color);
    color: var(--text-color);
    border-radius: var(--radius-pill);
    padding: 0.55rem 0.95rem;
    min-height: 2.5rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.assistant-option:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(200, 247, 81, 0.08);
}

.assistant-result {
    background: var(--surface-2-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
}

.assistant-result-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(200, 247, 81, 0.12);
    border: 1px solid rgba(200, 247, 81, 0.24);
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-pill);
    margin-bottom: 0.6rem;
}

.assistant-result h3 {
    font-size: 1.08rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.assistant-result-reason {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.8;
}

.assistant-result-note {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.8;
    margin-top: 0.5rem;
}

.assistant-result-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.9rem;
}

.assistant-result-actions .btn-primary,
.assistant-result-actions .btn-outline {
    width: 100%;
    padding: 0.7rem 1rem;
    font-size: 0.94rem;
}

.assistant-restart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.85rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--primary-color);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.assistant-restart:hover {
    color: var(--primary-hover);
}

.assistant-result-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    margin-top: 0.6rem;
}

.assistant-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: transparent;
    border: 1.5px dashed var(--border-color);
    color: var(--text-muted);
    border-radius: var(--radius-pill);
    padding: 0.5rem 0.95rem;
    min-height: 2.5rem;
    font-family: var(--font-body);
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.assistant-back:hover {
    color: var(--primary-color);
    border-color: var(--border-lime);
}

.assistant-note {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0.7rem 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--surface-2-color);
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.65;
}

.assistant-note i {
    color: var(--primary-color);
    margin-top: 0.15rem;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .assistant-fab {
        padding: 0.85rem 1.15rem;
        font-size: 0.92rem;
    }

    .assistant-panel {
        bottom: 5rem;
        inset-inline-end: 0.75rem;
        width: calc(100vw - 1.5rem);
        max-height: calc(100vh - 7rem);
    }
}