/* Feed de Notícias Styles */
:root {
}

/* Feed Header Component */

/* Main Navbar Styles */
.navbar {
    transition: padding 0.3s ease, height 0.3s ease;
    padding: 0.75rem 0;
    height: auto;
}

.navbar.navbar-shrink {
    padding: 0.25rem 0;
}

.navbar-brand {
    transition: font-size 0.3s ease, padding 0.3s ease;
    font-size: 1.25rem;
    padding: 0.5rem 1rem;
}

.navbar.navbar-shrink .navbar-brand {
    font-size: 1.45rem;
    padding: 0.25rem 1rem;
}

/* Dropdown items transition */
.dropdown .dropdown-toggle {
    transition: padding 0.3s ease;
    padding: 0.4rem 0.75rem;
}

.navbar.navbar-shrink .dropdown .dropdown-toggle {
    padding: 0.25rem 0.5rem;
}

/* User icon and language flag adjustments */
.navbar .dropdown img,
.navbar .dropdown i {
    transition: transform 0.3s ease;
}

.navbar.navbar-shrink .dropdown img {
    transform: scale(0.9);
}

.navbar.navbar-shrink .dropdown i {
    transform: scale(0.9);
}

.navbar-button, .navbar.navbar-shrink .dropdown i {
    font-size: 1.4rem;
    background: none; border: none;
    margin: 0;
}

/* Search Toggle Button in Navbar */
.search-toggle {
    color: rgba(255, 255, 255, 0.75);
    padding: 0.5rem;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    border-radius: 0.25rem;
}

.search-toggle:hover {
    color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    background-color: rgba(255, 255, 255, 0.1);
}

.search-toggle.active {
    color: #ffc107;
    background-color: rgba(255, 193, 7, 0.1);
}

.navbar.navbar-shrink .navbar-button {
    padding: 0.25rem;
    font-size: 1.2rem;
}

/* Feed Header Styles */
.feed-header {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 1019; /* Below navbar but above content */
    background-color: rgba(var(--bs-body-bg-rgb, 255, 255, 255), 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
    padding: 1.5rem 0;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.feed-header.show {
    position: relative;
}

.feed-header.header-shrink.show {
    position: fixed;
    top: var(--navbar-height, 70px);
}

.feed-header.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Feed header content styles */
.feed-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0;
    color: var(--bs-body-color);
}

.feed-header .form-label {
    font-size: 0.9rem;
    margin-bottom: 0;
    white-space: nowrap;
}

.feed-header .form-select {
    min-width: 200px;
}

/* Content padding adjustment when search is visible */
body.search-visible {
    transition: padding-top 0.3s ease;
}
.select-channel-container{
    width: 300px;
}

/* Dark theme support */
[data-bs-theme="dark"] .feed-header {
    background-color: rgba(var(--bs-dark-rgb, 33, 37, 41), 0.95);
    border-bottom-color: var(--bs-border-color-translucent);
}

[data-bs-theme="dark"] .search-toggle {
    color: rgba(255, 255, 255, 0.75);
}

[data-bs-theme="dark"] .search-toggle:hover {
    color: rgba(255, 255, 255, 1);
    background-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .search-toggle.active {
    color: #ffc107;
    background-color: rgba(255, 193, 7, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .feed-header .d-flex {
        flex-direction: column;
        align-items: stretch !important;
        gap: 1rem;
    }

    .feed-header h1 {
        font-size: 1.5rem;
        text-align: center;
    }

    .feed-header .form-select {
        min-width: auto;
        width: 100%;
    }

    .feed-header .form-label {
        text-align: center;
        margin-bottom: 0.5rem;
    }
}

/* Animation for search icon */
@keyframes searchPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.search-toggle.pulse {
    animation: searchPulse 0.6s ease;
}

/** Items container **/
#itemsContainer{
    min-height: 250px;
}
.news-item {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.news-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
}

.item-image {
    transition: transform 0.3s ease;
}

.news-item:hover .item-image {
    transform: scale(1.05);
}

.card-title {
    font-size: 1.1rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: unset;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-text {
    -webkit-line-clamp: unset;
    overflow: visible;
    display: block;
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.1;
}
.card-title, .card-text {
    min-height: var(--min-height, auto);
}

.category-badge {
    font-size: 0.75rem;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

.item-date-time {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
}

.channel-icon {
    min-width: 2rem;
    max-width: 8rem;
    min-height:20px;
    max-height: 30px;
    height: auto;
    border-radius: 0.25rem;
    object-fit: contain;
}

.read-more-container {
    display: flex;
    align-items: center;
}

#loadingSpinner {
    min-height: 100px;
}

.breaking-news {
    color: #dc3545 !important; /* Vermelho */
    font-weight: bold;
    animation: pulse 2s infinite;
}

.breaking-news-badge {
    background-color: #dc3545 !important; /* Vermelho */
    animation: pulse 2s infinite;
    font-size: 1.1em;
}

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

/* Opcional: Adicionar um glow effect */
.breaking-news {
    text-shadow: 0 0 5px rgba(220, 53, 69, 0.5);
}

.breaking-news-badge {
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.3);
}
/** sizes**/
.max-width-200{
    max-width: 200px;
}
.max-width-300{
    max-width: 300px;
}


/* Chart container styles */
.chart-container {
    background: #ffffff;
    border-radius: 0.375rem;
    overflow: hidden;
}

.chart-container canvas {
    display: block;
    border-radius: 0.375rem;
}
canvas.feed-chart{
    max-height: 300px;
}

/* Responsive adjustments */
@media only screen and (max-width:1200px) {

}
@media only screen and (max-width:992px) {
    .select-channel-container{
        width: 250px;
    }
}
@media only screen and (max-width:768px) {
    .select-channel-container{
        width: 100%;
    }
    .chart-container canvas {
        height: 250px !important;
    }
}
@media only screen and (max-width:576px) {
    .chart-container canvas {
        height: 200px !important;
    }
}
