/* Shared styling for analyzer result views */

.analysis-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.analysis-toolbar__search {
    flex: 1 1 16rem;
    min-width: 220px;
}

@media (max-width: 767.98px) {
    .analysis-toolbar__search {
        min-width: 100%;
    }
}

.analysis-toolbar__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.analysis-meta-card {
    box-shadow: 0 .125rem .5rem rgba(15, 23, 42, 0.05);
}

.analysis-meta-grid {
    margin: 0;
}

.analysis-meta-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bs-secondary-color);
}

.analysis-meta-value {
    font-weight: 600;
    color: var(--bs-body-color);
}

.analysis-kpi {
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.analysis-kpi__value {
    font-size: 1.35rem;
    font-weight: 600;
}

.analysis-store-summary {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.analysis-store-summary__item {
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    background-color: var(--bs-body-bg);
}

.analysis-store-summary__store {
    font-weight: 600;
    color: var(--bs-body-color);
}

.analysis-store-summary__metrics {
    margin: 0.75rem 0 0;
    display: grid;
    grid-template-columns: max-content auto;
    row-gap: 0.35rem;
    column-gap: 0.75rem;
    font-size: 0.85rem;
}

.analysis-store-summary__metrics dt {
    margin: 0;
    font-weight: 500;
    color: var(--bs-secondary-color);
}

.analysis-store-summary__metrics dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
}

.analysis-matrix {
    display: grid;
    gap: 0.5rem;
    align-items: stretch;
}

.analysis-matrix__corner {
    min-width: 12rem;
}

.analysis-matrix__header {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
    text-align: center;
}

.analysis-matrix__article {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bs-body-color);
    display: flex;
    align-items: center;
}

.analysis-matrix__cell {
    min-height: 2.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    position: relative;
    overflow: hidden;
}

.analysis-matrix__cell span {
    position: relative;
    z-index: 1;
}

.analysis-matrix__cell::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0.18;
    background: var(--bs-body-color);
}

.analysis-matrix__cell--empty {
    background-color: #f3f4f6;
    color: var(--bs-secondary-color);
}

.analysis-matrix__cell--insufficient {
    background: linear-gradient(135deg, #e5e7eb, #d1d5db);
    color: var(--bs-dark);
}

.analysis-matrix__cell--stable {
    background: linear-gradient(135deg, #22c55e, #15803d);
    color: #f0fdf4;
}

.analysis-matrix__cell--moderate {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: #fff7ed;
}

.analysis-matrix__cell--high {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #fee2e2;
}

.analysis-matrix__cell--balanced {
    background: linear-gradient(135deg, #10b981, #047857);
    color: #ecfdf5;
}

.analysis-matrix__cell--elastic {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #f8fafc;
}

.analysis-matrix__cell--inelastic {
    background: linear-gradient(135deg, #f97316, #dc2626);
    color: #fff7ed;
}

.analysis-matrix__cell--inactive {
    background: linear-gradient(135deg, #e5e7eb, #d1d5db);
    color: var(--bs-dark);
}

.analysis-matrix__cell--active {
    background: linear-gradient(135deg, #34d399, #059669);
    color: #f0fdf4;
}

.analysis-matrix__cell--slow {
    background: linear-gradient(135deg, #f97316, #dc2626);
    color: #fff7ed;
}

.analysis-matrix__cell--balanced::after,
.analysis-matrix__cell--elastic::after,
.analysis-matrix__cell--inelastic::after,
.analysis-matrix__cell--insufficient::after,
.analysis-matrix__cell--active::after,
.analysis-matrix__cell--inactive::after,
.analysis-matrix__cell--slow::after,
.analysis-matrix__cell--stable::after,
.analysis-matrix__cell--moderate::after,
.analysis-matrix__cell--high::after {
    opacity: 0.25;
}

.analysis-heatmap {
    display: grid;
    gap: 0.35rem;
    align-items: stretch;
}

.analysis-heatmap__header {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--bs-secondary-color);
    text-align: center;
}

.analysis-heatmap__header--corner {
    background: transparent;
}

.analysis-heatmap__article {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--bs-body-color);
    display: flex;
    align-items: center;
}

.analysis-heatmap__cell {
    min-height: 2.25rem;
    border-radius: 0.5rem;
    position: relative;
}

.analysis-heatmap__cell::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.analysis-heatmap__cell--none {
    background-color: #f3f4f6;
}

.analysis-heatmap__cell--low {
    background: linear-gradient(135deg, #fde68a, #fbbf24);
}

.analysis-heatmap__cell--medium {
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

.analysis-heatmap__cell--high {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}
