/**
 * Latest News Widget Stylesheet
 * File: latest-news.css
 *
 * Usage in Twig template:
 * <link rel="stylesheet" href="{{ asset('css/latest-news.css') }}">
 */

/* ========================================
   News Card Base Styles
   ======================================== */

.news-card {
    padding: 12px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4ff 100%);
    border-left: 4px solid #378add;
    border-radius: 4px;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-bottom: 16px;
}

.news-top {
    display: none;
}

.news-version {
    font-size: 10px;
    font-weight: 600;
    color: #378add;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.news-title {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 4px 0;
    padding: 0;
}

.news-text {
    font-size: 13px;
    color: #555;
    margin: 0 0 8px 0;
    padding: 0;
    line-height: 1.4;
}

.news-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 0.5px solid rgba(255, 255, 255, 0.5);
}

.news-meta {
    font-size: 11px;
    color: #666;
    flex: 1;
}

.news-date {
    font-size: 11px;
    color: #999;
    margin: 0;
    padding: 0;
}

/* ========================================
   Navigation Buttons
   ======================================== */

.nav-buttons {
    display: flex;
    gap: 4px;
}

.nav-btn {
    width: 24px;
    height: 24px;
    border: 0.5px solid #ccc;
    background: white;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #666;
    padding: 0;
    margin: 0;
    transition: all 0.15s ease;
    font-weight: 500;
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.nav-btn:hover:not(:disabled) {
    background: #f0f0f0;
    border-color: #378add;
    color: #378add;
}

.nav-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.nav-btn:focus {
    outline: 2px solid #378add;
    outline-offset: 2px;
}

/* ========================================
   Color Variants
   ======================================== */

/* Info variant (default/blue) */
.news-card.type-info {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4ff 100%);
    border-left-color: #378add;
}

.news-card.type-info .news-version {
    color: #378add;
}

/* Success variant (green) */
.news-card.type-success {
    background: linear-gradient(135deg, #f0fdf4 0%, #dffcf0 100%);
    border-left-color: #52c41a;
}

.news-card.type-success .news-version {
    color: #52c41a;
}

/* Warning variant (orange) */
.news-card.type-warning {
    background: linear-gradient(135deg, #fff4e6 0%, #ffe8cc 100%);
    border-left-color: #fa8c16;
}

.news-card.type-warning .news-version {
    color: #fa8c16;
}

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

@media (max-width: 768px) {
    .news-card {
        padding: 12px;
        min-height: 85px;
    }

    .news-title {
        font-size: 13px;
    }

    .news-text {
        font-size: 12px;
    }

    .news-version {
        font-size: 9px;
    }

    .news-date {
        font-size: 10px;
    }

    .nav-btn {
        width: 22px;
        height: 22px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .news-card {
        padding: 10px;
        min-height: 80px;
        margin-bottom: 12px;
    }

    .news-title {
        font-size: 13px;
        margin-bottom: 4px;
    }

    .news-text {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .news-bottom {
        gap: 8px;
    }

    .nav-buttons {
        gap: 3px;
    }

    .nav-btn {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }
}

/* ========================================
   Accessibility & Print
   ======================================== */

@media print {
    .nav-buttons {
        display: none;
    }

    .news-card {
        page-break-inside: avoid;
        border: 1px solid #999;
        background: white !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: more) {
    .nav-btn {
        border: 1px solid #666;
    }

    .nav-btn:disabled {
        opacity: 0.5;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .nav-btn {
        transition: none;
    }
}