/* Variables */
:root {
    --primary-color: #003852;
    --primary-dark: #00223b;
    --secondary-color: #008B9E;
    --accent-color: #98a5a6;
    --background-color: #ffffff;
    --text-color: #2c3e50;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --error-color: #e74c3c;
    --error-dark: #c0392b;
    --nav-bg-color: #24444d;
}

/* Universal Engine Icon Styling */
.engine-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #e8f0f2 0%, #d4e6ea 100%);
    border: 1px solid rgba(36, 68, 77, 0.2);
    color: #24444d;
}

.engine-icon img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

/* Universal Metrics Table Styling */
.metrics-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.metric-header {
    background: #24444d;
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-cell {
    padding: 20px 15px;
    text-align: center;
    vertical-align: middle;
    border-right: 1px solid #eee;
}

.metric-cell:last-child {
    border-right: none;
}

.metrics-table tbody tr:hover {
    background: #f8f9fa;
}

.metric-value {
    font-weight: bold;
    color: #24444d;
    font-size: 24px;
    margin-bottom: 8px;
}

.metric-change {
    font-weight: 600;
    color: #999;
    font-size: 13px;
    line-height: 1.2;
}

.metric-change.positive {
    color: #28a745;
}

.metric-change.negative {
    color: #dc3545;
}

.metric-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

/* Global Styles */
html, body {
    font-family: var(--font-family) !important;
    color: var(--text-color);
    line-height: 1.4;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-size: 14px;
}

/* Ensure all text elements use the font */
h1, h2, h3, h4, h5, h6,
p, span, a, button, input,
td, th, div {
    font-family: var(--font-family) !important;
}


/* Layout components */
.header {
    background-color: #FFFFFF;
    padding: 20px;
    margin: 0 0 20px 0;
    border-radius: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 2.125rem;
    font-weight: 400;
    line-height: 2.25rem;
    letter-spacing: 0.007em;
    color: #1F2121;  /* grey-color-90 */
}

.metrics-card {
    background-color: #FFFFFF;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow-x: auto;
}

.metrics-section {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin: 0 -20px 30px -20px;
    padding: 0 20px;
}

.main-content {
    flex: 0 0 100%;
    overflow: hidden;
    min-width: 600px;
}

/* Navigation Styles */
.nav-container {
    background-color: var(--nav-bg-color);
    padding: 0;
    width: 100%;
    margin: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    padding: 15px 20px;
}

.nav-bar a:first-child {
    margin-left: 40px;
}

.nav-bar a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-bar a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    text-decoration: none;
}

.nav-bar .active {
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

/* Tables */
.brand-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background-color: #FFFFFF;
    table-layout: auto;
}

.brand-table th,
.brand-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #DCE2E2;  /* grey-color-10 */
    vertical-align: top;
    word-wrap: break-word;
    white-space: nowrap;
}

.brand-table th {
    background-color: #EBF0EF;  /* grey-color-05 */
    font-weight: 600;
    white-space: nowrap;
    color: #1F2121;  /* grey-color-90 */
}

.brand-table tr:hover {
    background-color: #F5F7F7;  /* grey-color-02 */
}

/* Expandable rows and mentions styles */
.brand-table tr.expandable {
    cursor: pointer;
}

.brand-table tr.expandable:hover {
    background-color: #f8f9fa;
}

.expand-arrow {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    transition: transform 0.2s;
    color: #adb5bd;
    font-size: 0.8em;
}

.expand-arrow.expanded {
    transform: rotate(90deg);
}

.mentions-container {
    margin: 0;
    border-left: none;
    border-right: none;
    border-radius: 0;
}

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

.mentions-table th,
.mentions-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #dee2e6;
    text-align: left;
    vertical-align: top;
    font-size: 0.875rem;
    line-height: 1.4;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.mentions-table th {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    z-index: 1;
    font-weight: 600;
}

/* Column widths for mentions table */
.mentions-table th:nth-child(1),
.mentions-table td:nth-child(1) {
    width: 6%;
    min-width: 60px;
}

.mentions-table th:nth-child(2),
.mentions-table td:nth-child(2) {
    width: 75%;
    min-width: 300px;
    max-width: none;
}

.mentions-table th:nth-child(3),
.mentions-table td:nth-child(3) {
    width: 4%;
    min-width: 40px;
}

.mentions-table th:nth-child(4),
.mentions-table td:nth-child(4) {
    width: 6%;
    min-width: 50px;
}

.mentions-table th:nth-child(5),
.mentions-table td:nth-child(5) {
    width: 6%;
    min-width: 50px;
}

.mentions-table th:nth-child(6),
.mentions-table td:nth-child(6) {
    width: 3%;
    min-width: 30px;
}

.mention-details {
    background: white;
    border-top: none;
    display: none;
}

.mention-details.expanded {
    display: table-row;
}

/* Links */
.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #00A4C4;  /* sky-color-50 */
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    color: #00586D;  /* sky-color-70 */
}

/* Search section */
.search-section {
    margin: 0 -20px 2rem -20px;
    padding: 20px;
    display: flex;
    gap: 1rem;
    align-items: center;
    background: #FFFFFF;
    border-radius: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-bar {
    flex: 1;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-left: 2.5rem;
    border: 1px solid #DCE2E2;  /* grey-color-10 */
    border-radius: 4px;
    font-size: 1rem;
    font-family: 'Proxima Nova', serif;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #777C7B;  /* grey-base */
}

/* Chart styles */
.chart-container {
    flex: 0 0 600px;
    background: #FFFFFF;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chart-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
}

.donut-chart {
    width: 360px;
    height: 360px;
    margin: 0;
    flex-shrink: 0;
}

.chart-legend {
    flex: 1;
    font-size: 0.875rem;
    padding: 10px;
    max-height: 360px;
    overflow-y: auto;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.legend-color {
    width: 14px;
    height: 14px;
    margin-right: 10px;
    border-radius: 2px;
}

.legend-label {
    flex: 1;
    font-weight: 500;
    color: #1F2121;  /* grey-color-90 */
}

.legend-value {
    margin-left: 12px;
    color: #4C4F4F;  /* grey-color-70 */
    white-space: nowrap;
}

/* Sentiment section */
.sentiment-summary {
    flex: 1;
    min-width: 400px;
    max-width: calc(100% - 630px);
    background: #FFFFFF;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: fit-content;
}

.sentiment-item {
    padding: 16px;
    border: 1px solid #DCE2E2;  /* grey-color-10 */
    border-radius: 8px;
    margin-bottom: 16px;
    background-color: #F5F7F7;  /* grey-color-02 */
}

.sentiment-score {
    font-size: 1.1em;
    font-weight: 500;
    color: #FF472E;  /* red-base */
    margin-bottom: 8px;
}

.sentiment-text {
    color: #1F2121;  /* grey-color-90 */
    font-size: 0.95em;
    line-height: 1.5;
    margin-bottom: 8px;
    font-style: italic;
}

.sentiment-brand {
    color: #00809E;  /* sky-color-60 */
    font-weight: 500;
    font-size: 0.875rem;
    display: inline-block;
    background: rgba(0, 128, 158, 0.1);  /* sky-color-60 with opacity */
    padding: 4px 8px;
    border-radius: 4px;
}

/* URL display */
.url-box {
    max-height: 200px;
    overflow-y: auto;
    background-color: #EBF0EF;  /* grey-color-05 */
    border: 1px solid #DCE2E2;  /* grey-color-10 */
    border-radius: 4px;
    padding: 8px;
    margin-top: 8px;
    font-size: 0.875rem;  /* body-2 size */
    word-break: break-all;
}

.url-item {
    margin-bottom: 4px;
    padding: 8px;
    border-bottom: 1px solid #DCE2E2;  /* grey-color-10 */
    overflow: hidden;
    border-radius: 4px;
}

.url-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.url-item a {
    color: #00A4C4;  /* sky-color-50 */
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-all;
    line-height: 1.25rem;  /* body-1 line height */
}

.url-item a:hover {
    color: #00586D;  /* sky-color-70 */
}

/* Domain metrics */
.domain-metrics {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.domain-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.domain-name {
    font-weight: 600;  /* semibold weight */
    color: #00809E;  /* sky-color-60 */
    margin-bottom: 8px;
    font-size: 0.875rem;  /* body-2 size */
}

.domain-metrics .count {
    color: #4C4F4F;  /* grey-color-70 */
    font-size: 0.875rem;  /* body-2 size */
}

.percentage-pill {
    background-color: #EBF0EF;  /* grey-color-05 */
    padding: 4px 12px;
    border-radius: 0;
    font-weight: 500;
    color: #00809E;  /* sky-color-60 */
    border: 1px solid #DCE2E2;  /* grey-color-10 */
    white-space: nowrap;
    align-self: flex-start;
}

/* Prompt Group specific styles */
.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.brand-impact-btn {
    background-color: #24444d;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.2s;
}

.brand-impact-btn:hover {
    background-color: #0b5ed7;
}

.controllability-btn, .impact-btn {
    background-color: #198754;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.2s;
}

.controllability-btn:hover, .impact-btn:hover {
    background-color: #157347;
    color: white;
    text-decoration: none;
}

.text-analysis-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.2s;
}

.text-analysis-btn:hover {
    background-color: #5a6268;
    color: white;
    text-decoration: none;
}

.clear-mentions-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.2s;
}

.clear-mentions-btn:hover {
    background-color: #bb2d3b;
}

.response-selector {
    background-color: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    border-left: 4px solid #17a2b8;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.response-card {
    background-color: #f8f9fa;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    border-left: 4px solid #6f42c1;
}

.brand-mention {
    background-color: white;
    padding: 15px;
    margin: 10px 0;
    border-left: 4px solid #28a745;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.context-link {
    color: #4a7a8d;
    text-decoration: none;
    cursor: pointer;
}

.context-link:hover {
    text-decoration: underline;
}

.timestamp {
    color: #6c757d;
    font-size: 0.9em;
    font-family: monospace;
}

.context-section {
    margin-bottom: 2rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem;
}

.context-box {
    background-color: #f8f9fa;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
    border-left: 4px solid #17a2b8;
}

/* Impact table styles */
.impact-table-container {
    width: 100%;
    margin: 0;
}

.impact-table {
    width: 100%;
    table-layout: fixed;
}

.impact-table th:first-child {
    width: 40%;
}

.impact-table th:last-child {
    width: 60%;
}

.impact-table td.score {
    font-family: monospace;
    text-align: right;
    color: #24444d;
    font-weight: bold;
    white-space: normal;
    word-wrap: break-word;
    word-break: break-word;
    max-width: 150px;
}

.impact-table td.score small {
    display: block;
    color: #6c757d;
    font-weight: normal;
    font-size: 0.8em;
    margin-top: 4px;
    line-height: 1.4;
}

.impact-table tr:hover {
    background-color: #f8f9fa;
}

.impact-table td {
    padding: 8px 12px;
    vertical-align: top;
    border-bottom: 1px solid #dee2e6;
    word-wrap: break-word;
    word-break: break-word;
}

/* Content layout styles */
.content-layout {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.side-content {
    width: 400px;
    flex-shrink: 0;
    margin-right: 2rem;
}

@media (max-width: 1400px) {
    .content-layout {
        flex-direction: column;
    }
    
    .side-content {
        width: 100%;
        margin-right: 0;
        margin-bottom: 2rem;
    }
}

/* Responsive design */
@media screen and (max-width: 1200px) {
    .metrics-card {
        margin: 0;
        border-radius: 8px;
    }
    
    .brand-table {
        font-size: 0.9rem;
    }
    
    .brand-table th,
    .brand-table td {
        padding: 6px 8px;
    }
}

@media screen and (max-width: 768px) {
    .brand-table {
        font-size: 0.85rem;
    }
    
    .brand-table th,
    .brand-table td {
        padding: 4px 6px;
    }
    
    .brand-table th,
    .brand-table td {
        white-space: normal;
    }
}

/* Content Area */
#content {
    padding: 20px 40px;
    width: 100%;
    max-width: none;
    margin: 0 auto;
    background-color: white;
    min-height: calc(100vh - 60px);
    box-sizing: border-box;
    border-radius: 0;
}

.container {
    padding: 0;
    max-width: none;
    margin: 0;
}

/* Base styles */
.header {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.header h1 {
    margin: 0;
    color: #333;
    font-size: 1.75rem;
    font-weight: 600;
}

.header .info-bar {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: #666;
    margin-top: 0.5rem;
}

.info-bar-item {
    padding: 0 12px;
    border-right: 1px solid #dee2e6;
}

.info-bar-item:first-child {
    padding-left: 0;
}

.info-bar-item:last-child {
    border-right: none;
}

/* Metrics Card */
.metrics-card {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow-x: auto;
}

.metrics-card h2 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.75rem;
}

/* Search section */
.search-section {
    margin: 0 -20px 2rem -20px;
    padding: 20px;
    display: flex;
    gap: 1rem;
    align-items: center;
    background: white;
    border-radius: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-bar {
    flex: 1;
    position: relative;
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    padding-left: 2.5rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 1rem;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.search-button {
    padding: 0.75rem 1.5rem;
    background-color: #00809E;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-button:hover {
    background-color: #006B8E;
}

/* URL box styles */
.url-box {
    max-height: 200px;
    overflow-y: auto;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 8px;
    margin-top: 8px;
    font-size: 0.9em;
    word-break: break-all;
}

.url-item {
    margin-bottom: 4px;
    padding: 8px;
    border-bottom: 1px solid #e9ecef;
    overflow: hidden;
    border-radius: 4px;
}

.url-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.url-item a {
    color: #24444d;
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-all;
    line-height: 1.4;
}

.url-item a:hover {
    text-decoration: underline;
}

/* Breadcrumb styles */
.breadcrumb {
    display: flex;
    align-items: center;
    padding: 0.25rem 0;
    margin-bottom: 0.5rem;
    list-style: none;
    font-size: 0.875rem;
}

.breadcrumb-item {
    color: #6c757d;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.breadcrumb-item:hover {
    color: #0d6efd;
    text-decoration: none;
}

.breadcrumb-separator {
    color: #6c757d;
    margin: 0 0.5rem;
}

/* Main header */
.main-header {
    margin-bottom: 0.5rem;
}

/* Sorting module styles */
.sorting-module {
    margin-bottom: 20px;
    padding: 15px;
    background-color: white;
}

.sorting-options {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.sort-button {
    padding: 4px 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.75rem;
    color: #666;
    margin-right: 4px;
}

.sort-button:hover {
    background-color: #f8f9fa;
    border-color: #ced4da;
}

.sort-button.active {
    background-color: #f8f9fa;
    color: #0d6efd;
    border-color: #0d6efd;
    font-weight: 500;
}

.direction {
    margin-left: 4px;
    font-size: 0.7em;
    display: inline-block;
    pointer-events: none;
    color: inherit;
}

/* Report action buttons */
.report-actions {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #dee2e6;
    text-align: right;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-warning {
    background-color: #ffc107;
    color: #000;
}

.btn-warning:hover {
    background-color: #ffb300;
}

.btn-subtle {
    color: #842029;
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    padding: 8px 16px;
    font-size: 0.875rem;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-subtle:hover {
    color: #842029;
    background-color: #f5c2c7;
    border-color: #f5c2c7;
    text-decoration: none;
}

.btn-subtle.controllability, .btn-subtle.impact {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.btn-subtle.controllability:hover, .btn-subtle.impact:hover {
    color: #0f5132;
    background-color: #badbcc;
    border-color: #badbcc;
}

/* Sentiment styles */
.sentiment-cell {
    padding: 0 !important;
    background: inherit;
    max-width: 280px;
    overflow: hidden;
}

.sentiment-cell-inner {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: inherit;
    gap: 8px;
    white-space: nowrap;
}

.sentiment-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 8px;
    min-width: 60px;
    justify-content: center;
    text-transform: uppercase;
}

.sentiment-pill.positive {
    background-color: #d1e7dd;
    color: #0f5132;
    border: 1px solid #a3cfbb;
}

.sentiment-pill.negative {
    background-color: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

.sentiment-pill.neutral {
    background-color: #e9ecef;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.sentiment-distribution {
    font-size: 0.85em;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sentiment-distribution .sentiment-positive {
    color: #198754;
    font-weight: 500;
}

.sentiment-distribution .sentiment-negative {
    color: #dc3545;
    font-weight: 500;
}

.sentiment-distribution .sentiment-neutral {
    color: #6c757d;
    font-weight: 500;
}

.score {
    font-family: monospace;
}

.sentiment-positive {
    color: #198754;
}

.sentiment-negative {
    color: #dc3545;
}

.sentiment-neutral {
    color: #6c757d;
}

/* Report dropdown styles */
.report-dropdown {
    position: relative;
    display: inline-block;
    margin-right: 8px;
    min-width: 100px;
}

.report-dropdown select {
    padding: 4px 8px;
    font-size: 0.8rem;
    min-width: 150px;
    border: 1px solid #4a7a8d;
    border-radius: 4px;
    background-color: #4a7a8d;
    color: white;
    cursor: pointer;
    font-family: var(--font-family);
    transition: all 0.2s;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
}

.report-dropdown select:hover,
.report-dropdown select:focus,
.report-dropdown select:active {
    background-color: #3d6978;
    border-color: #3d6978;
}

.report-dropdown select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(74, 122, 141, 0.2);
}

/* Style the options */
.report-dropdown select option {
    padding: 4px;
    background-color: white;
    color: #333;
    font-weight: normal;
    font-family: var(--font-family);
    font-size: 0.85rem;
}

/* Style the first option (placeholder) */
.report-dropdown select option:first-child {
    font-weight: 600;
}

/* Global autocomplete disable */
input, textarea, select {
    -webkit-autofill: none !important;
    -webkit-box-shadow: 0 0 0 1000px white inset !important;
    -webkit-text-fill-color: inherit !important;
    background-clip: content-box !important;
}

/* Disable autocomplete dropdown styling */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px white inset !important;
    -webkit-text-fill-color: inherit !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Hide autocomplete suggestions */
input::-webkit-calendar-picker-indicator {
    display: none !important;
}

/* For Firefox */
input:-moz-autofill {
    background-color: white !important;
    color: inherit !important;
}

/* Optimize column widths for better space distribution */
.brand-table th:nth-child(1), /* Rank */
.brand-table td:nth-child(1) {
    width: 8%;
    min-width: 50px;
}

.brand-table th:nth-child(2), /* Parent Brand */
.brand-table td:nth-child(2) {
    width: 35%;
    min-width: 150px;
}

.brand-table th:nth-child(3), /* Impact */
.brand-table td:nth-child(3) {
    width: 15%;
    min-width: 80px;
}

.brand-table th:nth-child(4), /* Coverage */
.brand-table td:nth-child(4) {
    width: 20%;
    min-width: 100px;
}

.brand-table th:nth-child(5), /* Sentiment */
.brand-table td:nth-child(5) {
    width: 22%;
    min-width: 120px;
}

.group-meta {
    margin-bottom: 10px;
}

.group-date {
    color: #6c757d;
    font-size: 0.875rem;
}

/* Customer Management Styles */
.col-md-6.col-lg-4.mb-3 {
    margin-bottom: 10px !important;
}

/* Customer card spacing */
.customer-card {
    margin-bottom: 10px;
}

/* Button centering with icons */
.btn-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    justify-content: center;
}

.row {
    margin: 0 -12px !important;
}

.btn, button, input[type=submit], .action-btn {
    text-align: center !important;
    justify-content: center !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.action-btn {
    padding-left: 12px !important;
    padding-right: 12px !important;
    min-width: 80px !important;
}

/* Customer title link styling */
.customer-title-link {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.customer-title-link:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

.customer-title-link .customer-title {
    cursor: pointer;
}

/* Snapshot link styling to match customer link */
.snapshot-link {
    text-decoration: none;
    color: inherit;
}

/* Global pill/badge styles - Consolidated for engine and controllability */
.engine-badge,
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 0;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Control badge with fixed width for consistent alignment */
.control-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 0;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 80px;
    text-align: center;
    box-sizing: border-box;
}

/* Engine badge specific styling */
.engine-badge {
    background-color: #d1ecf1;
    color: #0c5460;
    font-size: 0.85rem;
}

/* Control badge states */
.control-badge.owned {
    background: #d4edda;
    color: #155724;
}

.control-badge.managed {
    background: #fff3cd;
    color: #856404;
}

.control-badge.leveraged {
    background: #d1ecf1;
    color: #0c5460;
}

.control-badge.unowned {
    background: #f8d7da;
    color: #721c24;
}

.control-badge.mixed {
    background: #ffc107;
    color: #856404;
}

/* Badge variations */
.badge-link {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-image {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* Clickable badges */
.badge.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    padding-right: 20px;
}

/* Clickable control badges with fixed width */
.control-badge.clickable {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    padding-right: 20px;
    width: 80px;
    text-align: center;
    box-sizing: border-box;
}

.control-badge.clickable:hover,
.badge.clickable:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.badge .dropdown-arrow {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.6rem;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.control-badge .dropdown-arrow {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.6rem;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.control-badge.clickable:hover .dropdown-arrow,
.badge.clickable:hover .dropdown-arrow {
    opacity: 1;
} 