/**
 * Widget Frontend Styles
 *
 * @package Crypto_News_Aggregator
 */

/* Widget Container */
.crypto-news-widget {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.crypto-news-widget .widget-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid #2271b1;
    color: #1d2327;
}

/* News List */
.crypto-news-widget-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* News Item */
.crypto-news-widget-item {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e5e5e5;
}

.crypto-news-widget-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Featured Image */
.crypto-news-widget-image {
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 6px;
}

.crypto-news-widget-image a {
    display: block;
    overflow: hidden;
    position: relative;
}

.crypto-news-widget-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.crypto-news-widget-image a:hover img {
    transform: scale(1.05);
}

/* Content */
.crypto-news-widget-content {
    padding: 0;
}

/* Title */
.crypto-news-widget-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 10px 0;
}

.crypto-news-widget-title a {
    color: #1d2327;
    text-decoration: none;
    transition: color 0.2s ease;
}

.crypto-news-widget-title a:hover {
    color: #2271b1;
}

/* Meta Information */
.crypto-news-widget-meta {
    font-size: 13px;
    color: #646970;
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.crypto-news-date {
    font-weight: 500;
}

.crypto-news-source {
    color: #2271b1;
}

/* Excerpt */
.crypto-news-widget-excerpt {
    margin-bottom: 12px;
}

.crypto-news-widget-excerpt p {
    font-size: 14px;
    line-height: 1.6;
    color: #50575e;
    margin: 0;
}

/* Read More Link */
.crypto-news-read-more {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: #2271b1;
    text-decoration: none;
    transition: all 0.2s ease;
}

.crypto-news-read-more:hover {
    color: #135e96;
    text-decoration: underline;
}

/* No Posts Message */
.crypto-news-no-posts {
    font-size: 14px;
    color: #646970;
    text-align: center;
    padding: 20px;
    background: #f6f7f7;
    border-radius: 4px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .crypto-news-widget-title {
        font-size: 15px;
    }
    
    .crypto-news-widget-excerpt p {
        font-size: 13px;
    }
    
    .crypto-news-widget-item {
        margin-bottom: 20px;
        padding-bottom: 20px;
    }
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
    .crypto-news-widget {
        background: #1d2327;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .crypto-news-widget .widget-title {
        color: #f0f0f1;
        border-bottom-color: #4f94d4;
    }
    
    .crypto-news-widget-item {
        border-bottom-color: #3c434a;
    }
    
    .crypto-news-widget-title a {
        color: #f0f0f1;
    }
    
    .crypto-news-widget-title a:hover {
        color: #72aee6;
    }
    
    .crypto-news-widget-excerpt p {
        color: #c3c4c7;
    }
    
    .crypto-news-widget-meta {
        color: #a7aaad;
    }
    
    .crypto-news-source {
        color: #72aee6;
    }
    
    .crypto-news-read-more {
        color: #72aee6;
    }
    
    .crypto-news-read-more:hover {
        color: #4f94d4;
    }
    
    .crypto-news-no-posts {
        background: #2c3338;
        color: #a7aaad;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.crypto-news-widget-item {
    animation: fadeIn 0.5s ease-in-out;
}

/* Widget in Sidebar */
.widget.crypto-news-widget {
    padding: 20px;
}

/* Compact Mode (for narrow sidebars) */
.sidebar-narrow .crypto-news-widget-image {
    margin-bottom: 10px;
}

.sidebar-narrow .crypto-news-widget-title {
    font-size: 14px;
}

.sidebar-narrow .crypto-news-widget-excerpt p {
    font-size: 12px;
}

/* Footer Branding */
.crypto-news-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e5e5e5;
    text-align: center;
}

.crypto-news-branding {
    display: inline-block;
    font-size: 11px;
    color: #646970;
    text-decoration: none;
    transition: color 0.2s ease;
}

.crypto-news-branding:hover {
    color: #2271b1;
}

.crypto-news-logo {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.crypto-news-logo strong {
    color: #2271b1;
    font-weight: 700;
}

/* Dark theme branding */
@media (prefers-color-scheme: dark) {
    .crypto-news-footer {
        border-top-color: #3c434a;
    }
    
    .crypto-news-branding {
        color: #a7aaad;
    }
    
    .crypto-news-branding:hover {
        color: #72aee6;
    }
    
    .crypto-news-logo strong {
        color: #72aee6;
    }
}
