/* Business Insights — aligned with metric cards, directory lists, and toolbar chips */

.business-insights-page__title .module-page-heading-icon {
    font-size: 1.15rem;
}

.business-insights-questions-card {
    position: sticky;
    top: 0.35rem;
    z-index: 2;
}

.business-insights-questions-card__body {
    padding: 0.45rem 0.65rem !important;
}

.business-insights-questions-card__title {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: #64748b;
    margin: 0 0 0.35rem;
    line-height: 1.2;
}

.business-insights-chip-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.3rem;
}

.business-insights-chip {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    border: 1px solid transparent;
    border-radius: 999px;
    min-height: 1.45rem;
    padding: 0.12rem 0.55rem;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 1px 1px rgba(15, 23, 42, 0.04);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.business-insights-chip .spinner-border {
    width: 0.65rem;
    height: 0.65rem;
    border-width: 0.1em;
}

.business-insights-chip--sky {
    background: #e0f2fe;
    border-color: #bae6fd;
    color: #075985;
}

.business-insights-chip--mint {
    background: #dcfce7;
    border-color: #bbf7d0;
    color: #166534;
}

.business-insights-chip--peach {
    background: #ffedd5;
    border-color: #fed7aa;
    color: #9a3412;
}

.business-insights-chip--lilac {
    background: #ede9fe;
    border-color: #ddd6fe;
    color: #5b21b6;
}

.business-insights-chip--rose {
    background: #ffe4e6;
    border-color: #fecdd3;
    color: #9f1239;
}

.business-insights-chip--butter {
    background: #fef9c3;
    border-color: #fde68a;
    color: #854d0e;
}

.business-insights-chip--aqua {
    background: #ccfbf1;
    border-color: #99f6e4;
    color: #115e59;
}

.business-insights-chip--sand {
    background: #f5f5f4;
    border-color: #e7e5e4;
    color: #44403c;
}

.business-insights-chip--slate {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #1e293b;
}

.business-insights-chip:hover:not(:disabled):not(.is-active) {
    filter: brightness(0.97);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.1);
}

.business-insights-chip.is-active {
    background: #0b6bcb;
    border-color: #0b6bcb;
    color: #fff;
    box-shadow: 0 1px 2px rgba(11, 107, 203, 0.28);
}

.business-insights-chip:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.business-insights-period-idle {
    color: #0b6bcb;
    background: #eff6ff;
    border-color: #bfdbfe;
    box-shadow: none;
}

.business-insights-period-idle:hover:not(:disabled) {
    color: #0958a8;
    background: #dbeafe;
    border-color: #93c5fd;
}

.business-insights-summary {
    margin: 0 0 1rem;
    padding: 0.75rem 0.85rem;
    border-radius: 0.5rem;
    border: 1px solid #7dd3fc;
    background: linear-gradient(180deg, #e0f2fe 0%, #f0f9ff 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.business-insights-summary__title {
    margin: 0 0 0.35rem;
    font-size: var(--app-text-sm, 0.8125rem);
    font-weight: 600;
    color: #0c4a6e;
}

.business-insights-summary__list {
    margin: 0;
    padding-left: 1.15rem;
    font-size: var(--app-text-sm, 0.8125rem);
    line-height: 1.45;
    color: var(--brand-sidebar-text, #334155);
}

.business-insights-summary__list li {
    margin-bottom: 0.3rem;
}

.business-insights-detail-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--bs-body-bg, #fff);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--brand-sidebar-text-muted, #1e293b);
    white-space: nowrap;
}

.business-insights-detail-table tbody tr:nth-of-type(odd) {
    background: #fff;
}

.business-insights-detail-table tbody tr:nth-of-type(even) {
    background: var(--app-row-stripe-mint, #b7dcc8);
}

.business-insights-detail-table tbody td {
    font-size: 0.8125rem;
    color: var(--brand-sidebar-text, #0f172a);
    vertical-align: middle;
}

.business-insights-detail-table--drillable tbody tr.business-insights-detail-row--clickable {
    cursor: pointer;
}

.business-insights-detail-table--drillable tbody tr.business-insights-detail-row--clickable:hover {
    background: #e0f2fe;
}

.business-insights-detail-table--drillable tbody tr.business-insights-detail-row--clickable.is-selected {
    background: #bae6fd;
    box-shadow: inset 3px 0 0 #0284c7;
}

.business-insights-share-bar {
    display: inline-block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.7rem;
    letter-spacing: 0.02em;
    color: #0f766e;
    white-space: nowrap;
}

.business-insights-drill-card {
    border: 1px solid #bae6fd;
}

.business-insights-period-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.35rem 0.55rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #f8fafc;
    margin-bottom: 0.5rem !important;
}

.business-insights-period-toolbar__start {
    justify-content: flex-start;
    min-width: 0;
}

.business-insights-period-toolbar__sep {
    width: 1px;
    height: 1.25rem;
    background: #cbd5e1;
    margin: 0 0.15rem;
}

.business-insights-period-toolbar__close {
    margin-left: auto;
}

.business-insights-period-anchor {
    color: #0f172a;
    min-width: 7rem;
    text-align: center;
}

.business-insights-result--refreshing {
    opacity: 0.72;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.business-insights-density-grid {
    width: max-content;
    max-width: 100%;
}

.business-insights-density-grid th,
.business-insights-density-grid td {
    font-size: 0.75rem;
    padding: 0.2rem 0.25rem;
}

.business-insights-density-grid__slot {
    white-space: nowrap;
    font-weight: 600;
    color: var(--brand-sidebar-text-muted, #475569);
    min-width: 3.5rem;
}

.business-insights-density-cell {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.1rem;
    min-height: 1.65rem;
    padding: 0.1rem 0.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.3rem;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}

.business-insights-density-cell--i1 {
    background: #ecfeff;
    border-color: #a5f3fc;
    color: #0e7490;
}

.business-insights-density-cell--i2 {
    background: #cffafe;
    border-color: #67e8f9;
    color: #155e75;
}

.business-insights-density-cell--i3 {
    background: #a5f3fc;
    border-color: #22d3ee;
    color: #164e63;
}

.business-insights-density-cell--i4 {
    background: #06b6d4;
    border-color: #0891b2;
    color: #fff;
}

.business-insights-density-cell:hover:not(:disabled) {
    box-shadow: 0 0 0 2px rgba(14, 116, 144, 0.2);
}

.business-insights-density-cell.is-selected {
    box-shadow: 0 0 0 2px #0b6bcb;
}

.business-insights-density-layout {
    display: grid;
    grid-template-columns: minmax(0, max-content) minmax(14rem, 1fr);
    gap: 0.75rem;
    align-items: start;
}

.business-insights-density-layout__matrix {
    min-width: 0;
}

.business-insights-density-layout__drill {
    min-width: 0;
    padding: 0.5rem 0.65rem;
    border-radius: 0.5rem;
    max-height: 22rem;
    display: flex;
    flex-direction: column;
}

.business-insights-density-drill__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    margin-bottom: 0.4rem;
}

.business-insights-density-drill__scroll {
    min-height: 0;
    overflow: auto;
    flex: 1 1 auto;
}

@media (max-width: 992px) {
    .business-insights-density-layout {
        grid-template-columns: 1fr;
    }

    .business-insights-density-layout__drill {
        max-height: 16rem;
    }
}

@media (max-width: 768px) {
    .business-insights-questions-card {
        position: static;
    }
}
