/* Enhanced Articles Sidebar Styles */

.articles-sidebar-enhanced {
    position: sticky;
    top: 84px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #e5e7eb #f9fafb;
}

.articles-sidebar-enhanced::-webkit-scrollbar {
    width: 6px;
}

.articles-sidebar-enhanced::-webkit-scrollbar-track {
    background: #f9fafb;
    border-radius: 3px;
}

.articles-sidebar-enhanced::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 3px;
}

.articles-sidebar-enhanced::-webkit-scrollbar-thumb:hover {
    background: #d1d5db;
}

/* Sidebar Box */
.sidebar-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.sidebar-box__title {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
}

/* Categories List */
.categories-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.category-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #374151;
    transition: all 0.2s ease;
    overflow: hidden;
}

.category-link__content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.category-link__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.category-link__icon svg {
    width: 24px;
    height: 24px;
}

.category-link__text {
    font-size: 0.9375rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-link__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.category-link__count {
    font-size: 0.75rem;
    color: #9ca3af;
    font-weight: 500;
}

/* Progress Bar */
.category-link__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: var(--progress, 0%);
    background: var(--category-color, #6366f1);
    opacity: 0;
    transition: all 0.3s ease;
}

/* Hover Effects */
.category-link:hover {
    background: #f9fafb;
    transform: translateX(2px);
}

.category-link:hover .category-link__progress {
    opacity: 0.3;
}

.category-link:hover .category-link__icon {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Active State */
.category-link--active {
    background: #f3f4f6;
    font-weight: 600;
}

.category-link--active .category-link__progress {
    opacity: 0.5;
}

.category-link--active .category-link__text {
    color: var(--category-color, #6366f1);
}

.category-link--active .category-link__count {
    color: var(--category-color, #6366f1);
    font-weight: 600;
}

/* Trending Section */
.sidebar-box--trending {
    background: #ffffff;
    border: 1px solid #e5e7eb;
}

.sidebar-box--trending .sidebar-box__title {
    color: #ef4444;
}

.trending-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trending-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    transition: all 0.2s ease;
}

.trending-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-color: #e5e7eb;
    background: #ffffff;
}

.trending-item__thumbnail {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    background: #f3f4f6;
}

.trending-item__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trending-item__content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.trending-item__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 4px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trending-item__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: #6b7280;
}

.trending-item__views {
    display: flex;
    align-items: center;
    gap: 4px;
}

.trending-item__views svg {
    width: 14px;
    height: 14px;
}

/* Enhanced Tags Cloud */
.tags-cloud--enhanced {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag--enhanced {
    display: inline-block;
    padding: 6px 12px;
    background: #f3f4f6;
    color: #4b5563;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    line-height: 1.2;
}

.tag--enhanced:hover {
    background: #6366f1;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
}

/* Newsletter Section */
.sidebar-box--newsletter {
    background: #ffffff;
    border: 1px solid #e5e7eb;
}

.sidebar-box--newsletter .sidebar-box__title {
    color: #6366f1;
}

.newsletter__description {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.newsletter-form__group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.newsletter-form__input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: #ffffff;
}

.newsletter-form__input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.newsletter-form__button {
    width: 100%;
    padding: 10px 16px;
    background: #6366f1;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.newsletter-form__button:hover {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(99, 102, 241, 0.3);
}

.newsletter-form__button:active {
    transform: translateY(0);
}

.newsletter-form__button svg {
    width: 20px;
    height: 20px;
}

.newsletter-form__privacy {
    font-size: 0.75rem;
    color: #6b7280;
    margin: 0;
    text-align: center;
}

.newsletter-form__message {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-top: 12px;
    animation: slideDown 0.3s ease;
}

.newsletter-form__message--success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.newsletter-form__message--error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .articles-sidebar-enhanced {
        position: static;
        max-height: none;
    }
    
    .sidebar-box {
        margin-bottom: 16px;
    }
}

@media (max-width: 768px) {
    .articles-sidebar-enhanced {
        display: none;
    }
}


/* RSS Feed Links (Epic 14 - Requirements: 12.6) */
.sidebar-box--rss {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: #ffffff;
}

.sidebar-box--rss .sidebar-box__title {
    color: #ffffff;
}

.rss-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rss-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.rss-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(4px);
}

.rss-link svg {
    flex-shrink: 0;
}

/* Dark mode adjustments for RSS */
[data-theme="dark"] {
    .sidebar-box--rss {
        background: linear-gradient(135deg, #dc2626 0%, #ea580c 100%);
    }
}
