/* ── Base widget ────────────────────────────────────────────── */
#nt-widget {
    margin: 20px auto;
    max-width: 450px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --nt-green:  #73a15b;
    --nt-teal:   #4c726c;
    --nt-text:   #2c3e50;
    --nt-meta:   #7f8c8d;
    --nt-border: #eee;
    --nt-hover:  #f8fafd;
}
#nt-widget * { box-sizing: border-box; }

.nt-box {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,104,137,0.15);
    overflow: hidden;
    border: 1px solid rgba(0,104,137,0.1);
}

/* Header */
.nt-head {
    background: linear-gradient(to right, #73a15b, #4c726c);
    color: white;
    padding: 20px 25px;
}
.nt-head-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.nt-head h2 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.nt-view-all {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}
.nt-view-all:hover { color: white; text-decoration: underline; }

/* FIX: LIVE UPDATES — white text, green dot (was all red) */
.nt-live-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-weight: 600;
    font-size: 14px;
}
.nt-live-dot {
    width: 10px;
    height: 10px;
    background: #73a15b;
    border-radius: 50%;
    animation: nt-pulse 1.5s infinite;
}

/* Ticker body */
.nt-body {
    height: 420px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(to bottom, #ffffff, #fafafa);
}
/* Bottom fade — hints at more items below */
.nt-body::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 72px;
    background: linear-gradient(to bottom, transparent, rgba(250,250,250,0.97));
    pointer-events: none;
    z-index: 2;
}
.nt-scroll-wrap { height: 100%; position: relative; overflow: hidden; }

/* Smooth step-scroll transition */
.nt-items {
    position: relative;
    width: 100%;
    transition: transform 0.75s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: transform;
}

/* News cards */
.nt-card {
    padding: 16px 25px;
    background: white;
    cursor: pointer;
    border-bottom: 1px solid var(--nt-border);
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 13px;
}
.nt-card:hover { background: var(--nt-hover); transform: translateX(5px); }

.nt-card-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    margin-top: 2px;
    background: #eee;
    border: 1px solid rgba(0,0,0,0.06);
}
.nt-card-info { flex: 1; min-width: 0; }
.nt-card-title {
    color: var(--nt-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.nt-card-excerpt {
    color: var(--nt-meta);
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.nt-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nt-card-badge {
    background: #e8f4f8;
    color: #73a15b;
    padding: 2px 7px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.nt-card-date {
    color: var(--nt-meta);
    font-size: 11px;
}

/* Footer */
.nt-footer {
    background: var(--nt-hover);
    padding: 12px 25px;
    border-top: 1px solid #eef2f7;
    color: #666;
    font-size: 12px;
    text-align: center;
}
.nt-brand { color: #73a15b; font-weight: 600; }

/* Loading / error states */
.nt-loading-state { text-align: center; padding: 50px 20px; color: var(--nt-meta); }
.nt-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #73a15b;
    border-radius: 50%;
    width: 36px; height: 36px;
    animation: nt-spin 1s linear infinite;
    margin: 0 auto 14px;
}
.nt-error-state { text-align: center; padding: 40px 20px; color: #e74c3c; font-size: 13px; }

/* ── Keyframes ──────────────────────────────────────────────── */
@keyframes nt-pulse { 0%,100%{opacity:1;} 50%{opacity:0.4;} }
@keyframes nt-spin  { to{transform:rotate(360deg);} }
@keyframes nt-slide-in { from{opacity:0;transform:translateY(22px);} to{opacity:1;transform:translateY(0);} }

/* ── View All Modal (dark) ──────────────────────────────────── */
.nt-va-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(6px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}
.nt-va-backdrop.active { display: flex; }

.nt-va-panel {
    background: #0f0f0f;
    border-radius: 24px;
    width: 92%; max-width: 500px; max-height: 88vh;
    display: flex; flex-direction: column;
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0,0,0,0.7);
    animation: nt-slide-in 0.3s ease;
}
.nt-va-head {
    background: linear-gradient(to right, #73a15b, #4c726c);
    padding: 18px 22px;
    display: flex; justify-content: space-between; align-items: center;
    flex-shrink: 0;
}
.nt-va-head h3  { color: white; font-size: 17px; font-weight: 700; margin: 0; letter-spacing: 0.4px; }
.nt-va-head-right { display: flex; align-items: center; gap: 10px; }
.nt-va-count {
    background: rgba(255,255,255,0.2);
    color: white;
    font-size: 11px; font-weight: 700;
    padding: 3px 9px; border-radius: 20px;
}
/* FIX: centred × via flex */
.nt-va-close {
    background: rgba(255,255,255,0.15);
    color: white; border: none;
    width: 28px; height: 28px; border-radius: 50%;
    cursor: pointer; font-size: 16px;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s; line-height: 1;
}
.nt-va-close:hover { background: rgba(255,255,255,0.3); }

/* Search */
.nt-va-search-wrap {
    padding: 14px 16px 10px;
    background: #0f0f0f;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nt-va-search {
    width: 100%;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 10px 14px 10px 38px;
    color: white; font-size: 13px; outline: none;
    font-family: inherit; transition: border 0.2s;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.35)' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 12px center;
}
.nt-va-search:focus       { border-color: rgba(115,161,91,0.5); }
.nt-va-search::placeholder { color: rgba(255,255,255,0.3); }

/* List */
.nt-va-list { overflow-y: auto; flex: 1; padding: 8px 0; }
.nt-va-list::-webkit-scrollbar       { width: 4px; }
.nt-va-list::-webkit-scrollbar-track { background: transparent; }
.nt-va-list::-webkit-scrollbar-thumb { background: rgba(115,161,91,0.3); border-radius: 4px; }

.nt-va-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 13px 18px; cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: background 0.2s;
}
.nt-va-item:hover      { background: rgba(115,161,91,0.08); }
.nt-va-item:last-child { border-bottom: none; }

/* FIX: number badge green (was #006889 blue) */
.nt-va-num {
    width: 28px; height: 28px;
    background: rgba(115,161,91,0.12);
    border: 1px solid rgba(115,161,91,0.22);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: #73a15b;
    flex-shrink: 0; margin-top: 2px;
}
.nt-va-thumb {
    width: 42px; height: 42px;
    border-radius: 7px; object-fit: cover;
    flex-shrink: 0;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
}
.nt-va-info { flex: 1; min-width: 0; }
.nt-va-title {
    color: white; font-size: 13px; font-weight: 600;
    line-height: 1.4; margin-bottom: 4px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.nt-va-excerpt {
    color: rgba(255,255,255,0.4);
    font-size: 11px; line-height: 1.4; margin-bottom: 5px;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.nt-va-meta  { display: flex; align-items: center; gap: 8px; }
.nt-va-badge {
    background: rgba(115,161,91,0.1); color: #73a15b;
    border: 1px solid rgba(115,161,91,0.2);
    padding: 2px 7px; border-radius: 10px;
    font-size: 10px; font-weight: 700;
}
.nt-va-date  { color: rgba(255,255,255,0.3); font-size: 11px; }
.nt-va-open  {
    width: 30px; height: 30px; border-radius: 50%;
    background: linear-gradient(135deg, #73a15b, #4c726c);
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; margin-top: 4px;
    transition: transform 0.2s;
    box-shadow: 0 2px 8px rgba(115,161,91,0.35);
    color: white; font-size: 13px; font-weight: 700;
}
.nt-va-open:hover { transform: scale(1.12); }

.nt-va-loading    { text-align: center; padding: 40px 20px; color: rgba(255,255,255,0.4); font-size: 13px; }
.nt-va-no-results { text-align: center; padding: 40px 20px; color: rgba(255,255,255,0.3); font-size: 13px; }

.nt-va-footer {
    padding: 12px 18px; background: #0f0f0f;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex; justify-content: center; flex-shrink: 0;
}
.nt-va-load-more {
    background: rgba(115,161,91,0.1); color: #73a15b;
    border: 1px solid rgba(115,161,91,0.25);
    padding: 9px 24px; border-radius: 20px;
    font-size: 12px; font-weight: 700; cursor: pointer;
    transition: all 0.2s; font-family: inherit; letter-spacing: 0.3px;
}
.nt-va-load-more:hover    { background: rgba(115,161,91,0.2); border-color: #73a15b; }
.nt-va-load-more:disabled { opacity: 0.4; cursor: default; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 480px) {
    #nt-widget .nt-box   { max-width: 100%; border-radius: 12px; }
    .nt-head             { padding: 16px 20px; }
    .nt-head h2          { font-size: 20px; }
    .nt-card             { padding: 13px 18px; }
    .nt-va-panel         { width: 100%; max-width: 100%; border-radius: 20px 20px 0 0; max-height: 92vh; position: fixed; bottom: 0; }
    .nt-va-backdrop      { align-items: flex-end; }
}
