/**
 * Phase 17 — Assistant widget (scoped; does not replace dashboard design system).
 */

#bbai-phase17-assistant {
    position: fixed;
    right: 20px;
    bottom: 24px;
    z-index: 100000;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.bbai-phase17-assistant__fab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 1rem;
    border-radius: 999px;
    border: none;
    background: #10b981;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
}

.bbai-phase17-assistant__fab:hover,
.bbai-phase17-assistant__fab:focus-visible {
    background: #059669;
    color: #fff;
}

.bbai-phase17-assistant__panel {
    position: absolute;
    right: 0;
    bottom: 52px;
    width: min(380px, calc(100vw - 40px));
    max-height: min(420px, 70vh);
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.bbai-phase17-assistant__panel[hidden] {
    display: none !important;
}

.bbai-phase17-assistant__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.85rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    font-size: 0.875rem;
}

.bbai-phase17-assistant__close {
    border: none;
    background: transparent;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
}

.bbai-phase17-assistant__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0.75rem 0.85rem;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #334155;
}

.bbai-phase17-assistant__reply {
    margin: 0 0 0.5rem;
}

.bbai-phase17-assistant__sources {
    margin: 0;
    padding-left: 1.1rem;
}

.bbai-phase17-assistant__foot {
    padding: 0.65rem 0.85rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.bbai-phase17-assistant__foot textarea {
    width: 100%;
    resize: vertical;
    min-height: 48px;
    font-size: 0.8125rem;
}

@media (max-width: 600px) {
    #bbai-phase17-assistant {
        right: 12px;
        bottom: 12px;
    }
}
