/* Additional custom styles for the AI news monitoring app */

/* Custom card styles for article listings */
.article-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Breaking news indicator */
.breaking-news-badge {
    animation: pulse 2s infinite;
    font-weight: bold;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Category pill styles */
.category-pill {
    border-radius: 20px;
    padding: 5px 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Relevance score indicator */
.relevance-indicator {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    background-color: var(--bs-primary);
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bs-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--bs-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-primary);
}

/* Article content container */
.article-content {
    line-height: 1.8;
    font-size: 1.1rem;
}

/* Summary box */
.summary-box {
    background-color: rgba(var(--bs-info-rgb), 0.1);
    border-left: 4px solid var(--bs-info);
    padding: 15px;
    border-radius: 0 5px 5px 0;
}

/* Search result highlight */
.search-highlight {
    background-color: rgba(var(--bs-warning-rgb), 0.3);
    padding: 0 3px;
    border-radius: 3px;
}

/* Dashboard stats card */
.stats-card {
    border-left: 5px solid;
    transition: transform 0.2s;
}

.stats-card:hover {
    transform: translateY(-5px);
}

/* Category icon styles */
.category-icon {
    width: 24px;
    height: 24px;
    margin-right: 5px;
}

/* Gradient background for headers */
.page-header {
    background: linear-gradient(135deg, var(--bs-dark) 0%, var(--bs-gray-800) 100%);
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--bs-gray-700);
}

/* Source filter list styling */
.source-filter-list {
    max-height: 300px;
    overflow-y: auto;
}

.source-filter-list .list-group-item.active {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.source-filter-list .badge {
    transition: all 0.2s ease;
}

.source-filter-list .list-group-item:hover .badge {
    background-color: var(--bs-info) !important;
}

/* Active filter indicators */
.active-filter-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    margin-left: 0.5rem;
    background-color: var(--bs-info);
    color: var(--bs-dark);
}

/* Article image handling */
.article-image {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.article-image img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
}

/* Image container with overlay */
.image-container {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
}

.article-detail-image {
    transition: transform 0.3s ease;
    cursor: pointer;
}

.image-container:hover .article-detail-image {
    transform: scale(1.02);
}

.image-overlay {
    position: absolute;
    bottom: 15px;
    right: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-container:hover .image-overlay {
    opacity: 1;
}

.zoom-btn {
    backdrop-filter: blur(3px);
    background-color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Article thumbnails */
.article-thumbnail-container {
    height: 180px;
    overflow: hidden;
    position: relative;
    background-color: var(--bs-gray-800);
}

.article-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-thumbnail {
    transform: scale(1.05);
}

/* List view styles */
.article-list-item {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.article-list-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.list-thumbnail-container {
    overflow: hidden;
    position: relative;
    background-color: var(--bs-gray-800);
    border-radius: 5px 0 0 5px;
}

.list-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-list-item:hover .list-thumbnail {
    transform: scale(1.05);
}

/* Theme-specific styles */
html[data-bs-theme="light"] .card {
    background-color: #ffffff;
    border-color: rgba(0, 0, 0, 0.125);
    color: #212529;
}

html[data-bs-theme="dark"] .card {
    background-color: #2b3035;
    border-color: rgba(255, 255, 255, 0.125);
    color: #f8f9fa;
}

html[data-bs-theme="light"] .card-header {
    background-color: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    color: #212529;
}

html[data-bs-theme="dark"] .card-header {
    background-color: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.125);
    color: #f8f9fa;
}

html[data-bs-theme="light"] .list-group-item {
    background-color: #ffffff;
    border-color: rgba(0, 0, 0, 0.125);
    color: #212529;
}

html[data-bs-theme="dark"] .list-group-item {
    background-color: #2b3035;
    border-color: rgba(255, 255, 255, 0.125);
    color: #f8f9fa;
}

/* Fix for navbar text in light mode */
html[data-bs-theme="light"] .navbar.bg-dark {
    background-color: #212529 !important;
}

html[data-bs-theme="light"] .navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

html[data-bs-theme="light"] .navbar-dark .navbar-nav .nav-link:hover,
html[data-bs-theme="light"] .navbar-dark .navbar-nav .nav-link:focus {
    color: #ffffff;
}

/* Additional text color fixes for light mode */
html[data-bs-theme="light"] p,
html[data-bs-theme="light"] h1, 
html[data-bs-theme="light"] h2, 
html[data-bs-theme="light"] h3, 
html[data-bs-theme="light"] h4, 
html[data-bs-theme="light"] h5, 
html[data-bs-theme="light"] h6,
html[data-bs-theme="light"] .form-label,
html[data-bs-theme="light"] .input-group-text,
html[data-bs-theme="light"] small,
html[data-bs-theme="light"] span:not(.badge):not(.navbar-toggler-icon),
html[data-bs-theme="light"] div.container,
html[data-bs-theme="light"] div.row,
html[data-bs-theme="light"] label {
    color: #212529;
}

/* Ensure footer text remains readable in light mode */
html[data-bs-theme="light"] footer.bg-dark {
    background-color: #212529 !important;
}

html[data-bs-theme="light"] footer.bg-dark span,
html[data-bs-theme="light"] footer.bg-dark small {
    color: #f8f9fa !important;
}

/* Improving contrast for text elements in different themes */
html[data-bs-theme="light"] {
    --text-muted: #6c757d;
}

html[data-bs-theme="dark"] {
    --text-muted: #a7acb1;
}

/* Enhance footer visibility in both themes */
html[data-bs-theme="light"] footer .text-muted {
    color: #495057 !important;
}

html[data-bs-theme="dark"] footer .text-muted {
    color: #ced4da !important;
}

/* Chart color adjustments based on theme */
html[data-bs-theme="light"] .dashboard-chart {
    --chart-grid-color: rgba(0, 0, 0, 0.1);
    --chart-text-color: #212529;
}

html[data-bs-theme="dark"] .dashboard-chart {
    --chart-grid-color: rgba(255, 255, 255, 0.1);
    --chart-text-color: #f8f9fa;
}

/* Custom scrollbar adjustments for light/dark theme */
html[data-bs-theme="light"] ::-webkit-scrollbar-track {
    background: #f1f1f1;
}

html[data-bs-theme="light"] ::-webkit-scrollbar-thumb {
    background: #c1c1c1;
}

html[data-bs-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}
