/* AnswerRails — Overview screen styles (#132 W5: page styling lives here,
   never in an inline <style> block). ⚠ This stylesheet carries rules for
   the Overview surfaces this plugin renders; AnswerRails Pro ships its own
   stylesheets for the surfaces it adds at the E9 insertion points (#174). */

.answerrails-overview-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.answerrails-overview-controls {
    margin-bottom: 0;
}

.time-range-toggle {
    display: flex;
    gap: 10px;
    background: #fff;
    padding: 5px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    width: fit-content;
}

.time-range-toggle a {
    padding: 8px 16px;
    border-radius: 3px;
    text-decoration: none;
    color: #2271b1;
    transition: all 0.2s;
}

.time-range-toggle a:hover {
    background: #f0f6fc;
}

.time-range-toggle a.active {
    background: #2271b1;
    color: #fff;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.status-summary-card .card-header {
    margin-bottom: 10px;
}

.status-summary-card .card-description {
    margin-top: 4px;
}

.status-summary-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.status-summary-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.status-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.status-summary-title {
    font-weight: 600;
    color: #1d2327;
}

.status-summary-value {
    font-weight: 600;
    color: #1d2327;
}

.status-summary-bar {
    position: relative;
    height: 8px;
    border-radius: 999px;
    background: #f0f0f1;
    overflow: hidden;
}

.status-summary-fill {
    height: 100%;
    border-radius: inherit;
    transition: width 0.3s ease;
}

.status-summary-fill.good { background: #2a9d4a; }
.status-summary-fill.warn { background: #ffb400; }
.status-summary-fill.alert { background: #d63638; }
.status-summary-fill.neutral { background: #c3c4c7; }

.status-summary-description {
    margin: 0;
    font-size: 12px;
    color: #666;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 15px;
}

.card-description {
    color: #666;
    margin: 0;
}

.card-context {
    font-size: 0.9em;
    color: #555;
    font-weight: 500;
}


.performance-table {
    width: 100%;
    border-collapse: collapse;
}

.performance-table th,
.performance-table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #f0f0f1;
}

.performance-table th {
    font-weight: 600;
    background: #f6f7f7;
}

.status-good { color: #46b450; font-weight: 500; }
.status-warning { color: #ffb900; font-weight: 500; }
.status-error { color: #dc3232; font-weight: 500; }
.status-neutral { color: #999; }

.health-checks {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.health-item {
    display: flex;
    align-items: center;
    gap: 10px;
}


@media (max-width: 782px) {
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

}

/* #140 C1: free-tier Grounding-outcomes card (real counts only). */
.answerrails-grounding-counts {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin: 8px 0 4px;
}
.answerrails-grounding-count {
    display: flex;
    flex-direction: column;
    min-width: 160px;
    flex: 1 1 160px;
}
.answerrails-grounding-tier-line {
    margin-top: 10px;
    border-top: 1px solid #f0f0f1;
    padding-top: 8px;
}
