/*
 * Plugin Name: TheBB Analyzer
 * Description: Styles for TheBB Analyzer plugin.
 */

/* General Popup Styles (No change, as they are layout/structure) */
@media (min-width: 768px) {
    .biasbreak-popup {max-width: 900px;}
}
.biasbreak-popup-header {padding: 1rem 1.5rem;display: flex;justify-content: space-between;align-items: center;border-bottom: 1px solid #ebebeb;font-size: 0.9rem;color: #555;}
.biasbreak-popup-header a {
color: #555;text-decoration: none;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;}
.biasbreak-popup-header .close-btn {background: none;border: none;font-size: 2.5rem;line-height: 0;color: #000000;cursor: pointer;margin-top: -70px;}
.biasbreak-popup-content {padding: 1.5rem;}
.article-summary {font-size: 1rem;color: #333;margin-bottom: 2rem;text-align: center;}
.metrics-list {list-style: none;padding: 0;margin: 0;border-top: 1px solid #f0f0f0;}
.metric-item {display: flex;align-items: center;padding: 1rem 0;border-bottom: 1px solid #f0f0f0;}
.metric-content {flex-grow: 1;text-align: center;}
.metric-item:last-child {border-bottom: none;}
.metric-value {color: #444;}
.metric-grid-item {padding: 1rem;}
@media (min-width: 768px) {.metric-grid-item.bias-score-col {border-left: 1px solid #f0f0f0;}}
@media (max-width: 767.98px) {.metric-grid-item.bias-score-col {border-top: 1px solid #f0f0f0;}}.metric-icon {margin-right: 1rem;color: #555;flex-shrink: 0;width: 24px;height: 24px;}
.metric-title {font-weight: 500;color: #222;display: block;margin-bottom: 0.25rem;}
.metric-value {color: #444;}

/* Score Bars (No change, as they are functional) */
.score-bar-container {display: flex;align-items: center;}
.score-bar-wrapper {flex-grow: 1;height: 12px;background-color: #e9ecef;border-radius: 6px;overflow: hidden;}
.score-bar {height: 100%;width: 0; /* JS will set this */background-color: #6172f3;border-radius: 6px;transition: width 0.5s ease-out;}.score-value {font-weight: 600;font-size: 1.5rem;margin-left: 1rem;}.bias-bar-container {position: relative;height: 12px;background-color: #e9ecef;border-radius: 6px;overflow: hidden;}.bias-bar {position: absolute;height: 100%;width: 0; background-color: #d9534f;transition: width 0.5s ease-out;}.metric-value.bias-text {color: #d9534f;font-weight: 500;margin-top: 0.25rem;
font-size: 0.9rem;}

.metric-subtext {font-size: 0.85rem;color: #6c757d;margin-top: 2px;}
.biasbreak-popup-footer {padding: 1rem;
background-color: #f8f9fa;border-top: 1px solid #ebebeb;text-align: center;}.biasbreak-popup-footer img {height: 35px;width: auto;}

/* --- UPDATED COLOR SCHEME --- */

/* Verdict Banners */
.verdict-banner {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1rem;
    color: #fff;
}
.verdict-banner.fake-news { /* Red for fake/critical */
    background-color: #dc3545; /* Bootstrap danger red */
}
.verdict-banner.opinion { /* Amber/Orange for opinion/caution */
    background-color: #ffc107; /* Bootstrap warning yellow */
    color: #343a40; /* Dark text for contrast */
}
.verdict-banner.reliable { /* Green/Blue for true/reliable */
    background-color: #28a745; /* Bootstrap success green */
}
.verdict-banner.default { /* Neutral grey for unknown/unsubstantiated */
    background-color: #6c757d; /* Bootstrap secondary grey */
}

/* Value Tags (General) */
.value-tag {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.85rem;
    border: 1px solid transparent;
}
.value-tag.medium-risk { /* Orange for medium risk */
    background-color: #fff3cd;
    color: #664d03;
    border-color: #ffc107;
}
.value-tag.negative { /* Red for negative sentiment/risk */
    background-color: #f8d7da;
    color: #842029;
    border-color: #dc3545;
}
.value-tag.not-detected { /* Light grey for 'not detected' */
    background-color: #e9ecef;
    color: #495057;
    border-color: #ced4da;
}
.value-tag.positive { /* Green for positive sentiment/low risk */
    background-color: #d1e7dd; /* Light green */
    color: #0f5132; /* Dark green text */
    border-color: #28a745;
}

/* --- NEW: Value Tags for Truth Status --- */
.value-tag.truth-true {
    background-color: #d1e7dd; /* Light green */
    color: #0f5132; /* Dark green text */
    border-color: #28a745;
}
.value-tag.truth-fake {
    background-color: #f8d7da; /* Light red */
    color: #842029; /* Dark red text */
    border-color: #dc3545;
}
.value-tag.truth-opinion {
    background-color: #fff3cd; /* Light yellow/orange */
    color: #664d03; /* Dark yellow/orange text */
    border-color: #ffc107;
}
.value-tag.truth-partially-true {
    background-color: #cfe2ff; /* Light blue */
    color: #052c65; /* Dark blue text */
    border-color: #0d6efd;
}
.value-tag.truth-unsubstantiated {
    background-color: #e2e3e5; /* Light grey */
    color: #41464b; /* Dark grey text */
    border-color: #6c757d;
}
.value-tag.truth-developing {
    background-color: #e6e6fa; /* Lavender */
    color: #4b0082; /* Indigo text */
    border-color: #8a2be2;
}


/* Ensure the .bias-bar color matches the bias-text color */
.bias-bar {
    background-color: #dc3545; /* Matching the fake-news/negative red for strong bias */
}
.metric-value.bias-text {
    color: #dc3545; /* Matching the fake-news/negative red for strong bias */
}

/* Loading Overlay Styles (No change, as they are functional) */
#bb-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0 !important;
    padding: 0 !important;
    background-color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    flex-direction: column;
    box-sizing: border-box !important;
}

#bb-loading-overlay h4 {
    color: #333;
    background-color: #fff;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2em;
    text-align: center;
    margin: 0;
    line-height: 1.2;
}

#bb-loading-overlay h4 img {
    height: 40px;
    width: auto;
    vertical-align: middle;
}

#bb-loading-overlay.show {
    display: flex !important;
}
