/* Estilos para el sistema de noticias - IDÉNTICO A NOTIFICACIONES */

.news-panel {
    width: 500px;
    max-height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 60px;
    right: 17px;
    z-index: 4;
    background: var(--white-d);
    border: 1px solid var(--color-9);
    border-radius: var(--radius-m);
    opacity: 0;
    visibility: hidden;
    box-shadow: var(--box-shadow);
    transform: translateX(110%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-panel.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.news-panel .news-header {
    width: 100%;
    padding: 1rem;
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
    gap: 0.5rem;
    border-bottom: 1px solid var(--color-9);
}

.news-panel .news-header .news-title {
    width: auto;
    display: block;
    font-size: 1rem;
    font-weight: var(--bold);
    color: var(--notification-text);
    margin: auto 0;
}

.news-panel .news-header .news-options {
    width: auto;
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-end;
    gap: 0.5rem;
    margin: auto 0;
}

.news-panel .news-header .news-options .news-filters {
    width: auto;
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.news-panel .news-header .news-options .news-filters .news-filter-btn {
    cursor: pointer;
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white-d);
    border: 1px solid var(--color-9);
    border-radius: var(--semiradius);
    transition: border 0.3s;
}

.news-panel .news-header .news-options .news-filters .news-filter-btn i {
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text);
}

.news-panel .news-header .news-options .news-filters .news-filter-btn:hover {
    border: 1px solid var(--text-d);
    transition: border 0.3s;
}

.news-panel .news-header .news-options .news-filters .news-filter-btn.active {
    background: var(--color-1);
    color: var(--white-d);
    border-color: var(--color-1);
}

.news-panel .news-header .news-options .news-filters .news-filter-btn.active i {
    color: var(--white);
}

.news-panel .news-options .news-controls {
    width: auto;
    display: flex;
    flex-flow: row nowrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.news-panel .news-options .news-controls .news-refresh-btn {
    cursor: pointer;
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white-d);
    border: 1px solid var(--color-9);
    border-radius: var(--semiradius);
    transition: border 0.3s;
}

.news-panel .news-options .news-controls .news-refresh-btn i {
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text);
}

.news-panel .news-options .news-controls .news-refresh-btn:hover {
    border: 1px solid var(--text-d);
    transition: border 0.3s;
}

.news-panel .news-list {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.news-panel .news-list .news-empty {
    padding: 2rem;
    text-align: center;
    color: var(--notification-text-light);
}

.news-panel .news-list .news-empty i {
    font-size: 3rem;
    opacity: 0.5;
}

.news-panel .news-list .news-empty p {
    font-size: 0.9rem;
    margin: 0.5rem auto 0 auto;
}

.news-panel .news-list .news-item {
    cursor: pointer;
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    border-bottom: 1px solid var(--color-9);
    transition: background-color 0.2s ease;
}

.news-panel .news-list .news-item:last-child {
    border-bottom: none;
}

.news-panel .news-list .news-item:hover {
    background: rgb(0 0 0 / 3%);
}

.news-panel .news-list .news-item .news-item-content {
    flex: 1;
    min-width: 0;
}

.news-panel .news-list .news-item .news-item-content .news-item-title {
    font-size: 1rem;
    font-weight: var(--bold);
    color: var(--notification-text);
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.news-panel .news-list .news-item .news-item-content .news-item-title a {
    color: var(--notification-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-panel .news-list .news-item .news-item-content .news-item-title a:hover {
    color: var(--color-1);
}

.news-panel .news-list .news-item .news-item-content .news-item-message {
    display: block;
    font-size: 0.8rem;
    font-weight: var(--regular);
    line-height: 1.4;
    color: var(--notification-text-light);
    text-align: left;
    line-clamp: 2;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.news-panel .news-list .news-item .news-item-content .news-item-time {
    font-size: 0.7rem;
    font-weight: var(--regular);
    color: var(--notification-text-light);
    text-align: left;
}

.news-panel .news-list .news-category-section {
    border-bottom: 1px solid var(--color-9);
}

.news-panel .news-list .news-category-section:last-child {
    border-bottom: none;
}

.news-panel .news-list .news-category-header {
    padding: 0.75rem 1rem;
    background: rgb(0 0 0 / 2%);
    border-left: 4px solid var(--color-1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: var(--bold);
    font-size: 0.9rem;
    color: var(--notification-text);
}

.news-panel .news-list .news-category-header i {
    font-size: 1.1rem;
}

.news-panel .news-list .news-category-header .news-category-title {
    flex: 1;
}

.news-panel .news-list .news-category-header .news-category-count {
    background: var(--color-9);
    color: var(--text);
    padding: 0.25rem 0.5rem;
    border-radius: var(--fullradius);
    font-size: 0.7rem;
    font-weight: var(--bold);
}

.news-panel .news-list .news-category-items {
    background: var(--white-d);
}

.news-panel .news-list .news-error {
    padding: 2rem;
    text-align: center;
    color: var(--notification-error);
}

.news-panel .news-list .news-error i {
    font-size: 3rem;
    opacity: 0.5;
}

.news-panel .news-list .news-error p {
    font-size: 0.9rem;
    margin: 0.5rem auto 0 auto;
}

.news-panel .news-list .news-error .news-retry-btn {
    background: var(--notification-error);
    color: var(--white-d);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--semiradius);
    cursor: pointer;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s ease;
    margin-top: 1rem;
}

.news-panel .news-list .news-error .news-retry-btn:hover {
    background: #c82333;
}

.news-panel .news-footer {
    width: 100%;
    padding: 1rem;
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
    border-top: 1px solid var(--color-9);
    background: rgb(0 0 0 / 2%);
}

.news-panel .news-footer .news-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.news-panel .news-footer .news-info .news-count {
    font-size: 0.8rem;
    font-weight: var(--bold);
    color: var(--notification-text);
}

.news-panel .news-footer .news-info .news-update {
    font-size: 0.7rem;
    font-weight: var(--regular);
    color: var(--notification-text-light);
}

/* Scrollbar personalizado */
.news-panel .news-list::-webkit-scrollbar {
    width: 6px;
}

.news-panel .news-list::-webkit-scrollbar-track {
    background: var(--color-9);
}

.news-panel .news-list::-webkit-scrollbar-thumb {
    background: var(--color-7);
    border-radius: 3px;
}

.news-panel .news-list::-webkit-scrollbar-thumb:hover {
    background: var(--color-6);
}

/* Responsive */
@media (max-width: 768px) {
    .news-panel {
        width: calc(100vw - 2rem);
        right: 1rem;
        left: 1rem;
        max-height: 70vh;
    }
    
    .news-panel .news-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .news-panel .news-header .news-filters {
        justify-content: center;
    }
    
    .news-panel .news-header .news-filters .news-filter-btn {
        flex: 1;
        min-width: 0;
    }
    
    .news-panel .news-list .news-item .news-item-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .news-panel .news-list .news-item .news-item-time {
        white-space: normal;
    }
}

/* Animaciones */
.news-panel {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
