/**
 * Widget Styles for Novel Reader Theme
 *
 * FIX: Integrated CSS variables for theme consistency and dark mode support.
 * FIX: Restructured to follow a "Mobile-First" approach.
 *
 * @package Novel_Reader
 */

/* ==========================================================================
   Base Styles for All Widgets (Optional but recommended)
   ========================================================================== */

.widget {
    margin-bottom: 2rem;
    background-color: var(--color-surface, #fff);
    padding: 1.5rem;
    border-radius: var(--radius, 8px);
    box-shadow: var(--shadow, 0 2px 5px rgba(0,0,0,0.08));
}

.widget-title {
    margin-top: 0;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-accent, #e74c3c);
    font-size: 1.2rem;
    color: var(--color-primary);
}


/* ==========================================================================
   Popular Novels Widget - Mobile-First Styles
   ========================================================================== */

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

.widget_popular_novels .popular-novel-item {
    display: flex;
    align-items: flex-start;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--color-bg, #eee);
}

.widget_popular_novels .popular-novel-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.widget_popular_novels .novel-thumbnail {
    flex: 0 0 60px; /* Base size for mobile */
    margin-left: 15px; /* LTR support */
}

.rtl .widget_popular_novels .novel-thumbnail {
    margin-left: 0;
    margin-right: 15px; /* RTL support */
}

.widget_popular_novels .novel-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.widget_popular_novels .novel-details {
    flex: 1;
}

.widget_popular_novels .novel-title {
    margin: 0 0 5px;
    font-size: 14px; /* Base size for mobile */
    line-height: 1.4;
}

.widget_popular_novels .novel-title a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.widget_popular_novels .novel-title a:hover {
    color: var(--color-accent);
}

.widget_popular_novels .novel-author,
.widget_popular_novels .novel-rating {
    display: flex;
    align-items: center;
    font-size: 12px; /* Base size for mobile */
    color: var(--color-text);
    opacity: 0.8;
    margin-top: 5px;
}

.widget_popular_novels .dashicons {
    font-size: 15px;
    width: 15px;
    height: 15px;
    margin-left: 5px; /* LTR support */
}

.rtl .widget_popular_novels .dashicons {
    margin-left: 0;
    margin-right: 5px; /* RTL support */
}

.widget_popular_novels .novel-rating .dashicons-star-filled {
    color: #FFB900; /* Star color can remain consistent */
}


/* ==========================================================================
   Tablet Styles (and up) - min-width: 768px
   ========================================================================== */

@media screen and (min-width: 768px) {
    .widget_popular_novels .novel-thumbnail {
        flex: 0 0 70px; /* Slightly larger image for tablets */
    }
    
    .widget_popular_novels .novel-title {
        font-size: 16px;
    }
    
    .widget_popular_novels .novel-author,
    .widget_popular_novels .novel-rating {
        font-size: 13px;
    }
}
