/**
 * Sidebar Styles
 * 
 * Styles for the sidebar and its widgets.
 * 
 * @package    Magazines_Collection
 * @since      0.1.1
 */

/* ==========================================================================
   Page Container Layout
   ========================================================================== */

.mc-page-container {
    display: flex;
    gap: 0;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 0 2rem 0;
}

.mc-sidebar-left {
    width: 320px;
    flex-shrink: 0;
}

.mc-main-content {
    flex: 1;
    min-width: 0; /* Prevent flex item from overflowing */
    border: none;
    border-radius: 0;
    overflow: visible;
}

.mc-sidebar {
    width: 320px;
    flex-shrink: 0;
}

/* ==========================================================================
   Sidebar Widgets
   ========================================================================== */

.mc-sidebar-widget {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 0;
    overflow: hidden;
}

.mc-sidebar-widget:last-child {
    margin-bottom: 0;
}

.mc-sidebar-widget-title {
    background: #f5f7fa;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #ddd;
}

.mc-sidebar-widget-content {
    padding: 1rem;
}

.mc-no-content {
    color: #666;
    font-size: 0.875rem;
    font-style: italic;
    margin: 0;
}

/* ==========================================================================
   News Widget
   ========================================================================== */

.mc-news-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.mc-news-item:first-child {
    padding-top: 0;
}

.mc-news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.mc-news-item.has-thumbnail {
    display: flex;
    gap: 0.75rem;
}

.mc-news-thumbnail {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    overflow: hidden;
    border-radius: 4px;
}

.mc-news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.mc-news-title {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 0.25rem 0;
}

.mc-news-title a {
    color: #333;
    text-decoration: none;
}

.mc-news-title a:hover {
    color: #0073aa;
}

.mc-news-date {
    display: block;
    color: #666;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
}

.mc-news-excerpt {
    color: #555;
    font-size: 0.813rem;
    line-height: 1.4;
    margin: 0.5rem 0 0 0;
}

/* ==========================================================================
   Recent Additions Widget
   ========================================================================== */

.mc-recent-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mc-recent-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.mc-recent-item:first-child {
    padding-top: 0;
}

.mc-recent-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.mc-recent-thumbnail {
    flex-shrink: 0;
    width: 50px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mc-recent-info {
    flex: 1;
    min-width: 0;
}

.mc-recent-title {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.25rem;
    color: #333;
}

.mc-recent-issue {
    font-size: 0.813rem;
    color: #555;
    margin-bottom: 0.25rem;
}

.mc-recent-meta {
    font-size: 0.75rem;
    color: #666;
}

.mc-user-name {
    font-weight: 500;
    color: #0073aa;
}

/* ==========================================================================
   Popular Magazines Widget
   ========================================================================== */

.mc-popular-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mc-popular-item {
    border-bottom: 1px solid #eee;
}

.mc-popular-item:last-child {
    border-bottom: none;
}

.mc-popular-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    text-decoration: none;
    color: inherit;
    transition: background-color 0.2s;
}

.mc-popular-link:hover {
    background-color: #f9f9f9;
}

.mc-popular-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #333;
    flex: 1;
}

.mc-popular-link:hover .mc-popular-title {
    color: #0073aa;
}

.mc-popular-count {
    font-size: 0.75rem;
    color: #666;
    background: #f0f0f0;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    white-space: nowrap;
}

/* ==========================================================================
   Site Statistics Widget
   ========================================================================== */

.mc-stats-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.mc-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0.75rem;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
}

.mc-stat-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.mc-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0073aa;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.mc-stat-label {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
    .mc-sidebar {
        width: 280px;
    }
}

@media (max-width: 768px) {
    .mc-page-container {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .mc-sidebar {
        width: 100%;
    }
    
    .mc-sidebar-widget {
        margin-bottom: 1rem;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .mc-sidebar {
        display: none;
    }
    
    .mc-main-content {
        width: 100%;
    }
}
