﻿/*
 * assets/news-widget.css
 * Compact, single-line Bangladesh News widget.
 */

.bnw {
    width: 100%;
    max-width: 90%;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, Arial, sans-serif;
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 7px;
    overflow: hidden;
}

.bnw * {
    box-sizing: border-box;
}

.bnw-header {
    min-height: 39px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 11px;
    border-bottom: 1px solid #e1e5e9;
    background: #f7f8fa;
}

.bnw-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.bnw-refresh {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 19px;
    line-height: 1;
    padding: 1px 4px;
}

.bnw-refresh:hover {
    opacity: .6;
}

.bnw-list {
    width: 100%;
}

.bnw-item {
    display: flex;
    align-items: baseline;
    width: 100%;
    min-width: 0;
    gap: 7px;
    padding: 4px 11px;
    border-bottom: 1px solid #edf0f2;
    line-height: 1.3;
    overflow: hidden;
}

.bnw-item:last-child {
    border-bottom: 0;
}

.bnw-headline {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: #202428;
    text-decoration: none;
    font-size: 15px;
    font-weight: 400;
}

.bnw-headline:hover {
    text-decoration: underline;
}

.bnw-time,
.bnw-source {
    flex: 0 0 auto;
    white-space: nowrap;
    color: #888;
    font-size: 10.5px;
    font-weight: 400;
}

.bnw-time {
    min-width: 25px;
    text-align: right;
}

.bnw-source {
    min-width: 92px;
}

.bnw-loading,
.bnw-empty,
.bnw-error {
    padding: 12px 11px;
    color: #777;
    font-size: 13px;
}

.bnw-error {
    color: #a33;
}

@media (max-width: 600px) {
    .bnw-header {
        min-height: 37px;
        padding: 6px 9px;
    }

    .bnw-title {
        font-size: 14px;
    }

    .bnw-item {
        gap: 5px;
        padding: 4px 8px;
    }

    .bnw-headline {
        font-size: 13px;
    }

    .bnw-time,
    .bnw-source {
        font-size: 9.5px;
    }

    .bnw-source {
        min-width: 78px;
        max-width: 105px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
