/* Sidebar Wrapper */
.newsai-sidebar-wrapper { padding: 5px; }

/* Alerts & Tasks */
.newsai-alert-badge { background: #fff3e0; border-left: 4px solid #e67e22; padding: 12px; border-radius: 6px; margin-bottom: 15px; font-size: 13px; color: #d35400; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.newsai-alert-badge span:hover { transform: scale(1.2); filter: drop-shadow(0 0 2px #f1c40f); }

/* Trends List */
.newsai-section-title { font-weight: bold; font-size: 11px; color: var(--nros-text-muted, #555); text-transform: uppercase; border-bottom: 1px solid var(--nros-border-subtle, #eee); padding-bottom: 5px; margin-bottom: 10px; }
.newsai-trends-list { margin: 0; padding: 0; list-style: none; }
.newsai-trends-list li { margin-bottom: 8px; font-size: 13px; }
.newsai-trends-list li a { text-decoration: none; color: var(--nros-accent, #0073aa); font-weight: 500; }
.newsai-trends-list li a:hover { color: #d63638; }

.newsai-sidebar-section { margin-bottom: 15px; }

/* --- NEW BEAUTIFUL BUTTONS --- */
.newsai-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 8px;
    background: var(--nros-surface, #fff);
    color: var(--nros-text, #1d2327);
    box-sizing: border-box;
}

.newsai-action-btn .dashicons { font-size: 18px; line-height: 1; }

.newsai-action-btn:focus-visible {
    outline: 2px solid var(--nros-accent, #2271b1);
    outline-offset: 2px;
}

.nros-brief-bar__label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--nros-text-muted, #50575e);
    margin-bottom: 6px;
}
.nros-brief-bar__input {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 8px;
    padding: 8px 10px;
    border: 1px solid var(--nros-border, #c3c4c7);
    border-radius: 6px;
    font-size: 13px;
    background: var(--nros-surface, #fff);
    color: var(--nros-text, #1d2327);
}
.nros-brief-output {
    margin-top: 10px;
    font-size: 12px;
    line-height: 1.45;
    color: var(--nros-text, #1d2327);
}
.nros-brief-output h4 {
    margin: 0 0 6px;
    font-size: 13px;
}
.nros-brief-output ul {
    margin: 4px 0 8px 18px;
    padding: 0;
}
.nros-brief-output a {
    color: var(--nros-accent, #2271b1);
}

.newsai-btn-outline-blue { border: 2px solid var(--nros-accent, #2271b1); color: var(--nros-accent, #2271b1); }
.newsai-btn-outline-blue:hover { background: var(--nros-accent-soft, #f0f6fc); }

.newsai-btn-solid-green { background: #16a085; border: 2px solid #16a085; color: #fff; }
.newsai-btn-solid-green:hover { background: #1abc9c; border-color: #1abc9c; }

.newsai-btn-solid-blue { background: var(--nros-accent, #2271b1); border: 2px solid var(--nros-accent, #2271b1); color: #fff; }
.newsai-btn-solid-blue:hover { background: var(--nros-accent-hover, #135e96); border-color: var(--nros-accent-hover, #135e96); color: #fff;}

/* UX polish */
.nros-sb-card {
    transition: box-shadow .2s ease, transform .2s ease;
}
.nros-sb-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.07);
}
#nros-focus-mode-card {
    border: 1px solid var(--nros-accent-border, #cce0f0);
    background: linear-gradient(180deg, var(--nros-surface, #ffffff) 0%, var(--nros-accent-soft, #f8fbff) 100%);
}
.nros-toast {
    position: fixed;
    right: 16px;
    bottom: 18px;
    z-index: 99999;
    background: var(--nros-toast-bg, #1d2327);
    color: var(--nros-toast-fg, #fff);
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 12px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.25);
}

/* Circular gauge */
.nros-gauge-wrap { position: relative; width: 112px; height: 112px; }
.nros-gauge-donut {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    background: conic-gradient(#dc2626 0%, #dc2626 0%, var(--nros-gauge-track, #e5e7eb) 0%, var(--nros-gauge-track, #e5e7eb) 100%);
    position: relative;
    transition: background .35s ease;
    transform-origin: center center;
}
#nros-readiness-ring.nros-readiness-ring--pulse {
    animation: nrosReadinessRingPulse .48s ease-out;
}
@keyframes nrosReadinessRingPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
    45% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(99, 102, 241, .12); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}
.nros-gauge-donut::after {
    content: "";
    position: absolute;
    inset: 11px;
    background: var(--nros-gauge-hole, #fff);
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px var(--nros-border-subtle, #f3f4f6);
}
.nros-gauge-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.nros-gauge-center strong { font-size: 20px; font-weight: 800; color: var(--nros-text, #1d2327); }

/* Skeleton loaders */
.nros-skeleton { display: block; border-radius: 8px; background: linear-gradient(90deg, var(--nros-skeleton-a, #f1f3f5) 25%, var(--nros-skeleton-b, #e6e9ec) 37%, var(--nros-skeleton-a, #f1f3f5) 63%); background-size: 400% 100%; animation: nrosShimmer 1.2s ease infinite; }
.nros-skeleton-card { padding: 10px 0; border-bottom: 1px solid var(--nros-border-subtle, #f0f0f1); }
.nros-skeleton-line-sm { height: 10px; width: 35%; margin-bottom: 8px; }
.nros-skeleton-line-lg { height: 14px; width: 92%; }
@keyframes nrosShimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

/* Onboarding modal */
#nros-onboarding-modal { position: fixed; inset: 0; z-index: 99999; }
.nros-onboarding-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.42); }
.nros-onboarding-dialog { position: relative; max-width: 360px; margin: 12vh auto 0; background: var(--nros-surface, #fff); color: var(--nros-text, #1d2327); border-radius: 10px; padding: 18px; box-shadow: 0 12px 40px rgba(0,0,0,.25); border: 1px solid var(--nros-border, #e2e4e7); }
.nros-onboarding-dialog h3 { margin: 0 0 10px; font-size: 16px; color: var(--nros-text, #1d2327); }
.nros-onboarding-dialog ul { margin: 0 0 14px 18px; padding: 0; color: var(--nros-text-muted, #3c434a); font-size: 13px; }
.nros-onboarding-dialog li { margin-bottom: 6px; }

/* Suggested tags confidence badge */
.nros-tag-pill-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0 4px 6px 0;
}
.nros-tag-confidence {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    border: 1px solid transparent;
}
.nros-tag-confidence.high {
    background: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
}
.nros-tag-confidence.medium {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}
.nros-tag-confidence.low {
    background: #f3f4f6;
    color: #374151;
    border-color: #d1d5db;
}

/* Mobile bottom sheet for editor sidebar */
@media (max-width: 782px) {
    #newsai_sidebar.postbox.nros-mobile-sheet {
        position: fixed;
        left: 8px;
        right: 8px;
        bottom: 8px;
        z-index: 9998;
        margin: 0 !important;
        border-radius: 12px;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
        background: var(--nros-surface, #fff);
        max-height: min(75vh, 560px);
        overflow: hidden;
        transform: translateY(calc(100% - 52px));
        transition: transform .25s ease;
    }
    #newsai_sidebar.postbox.nros-mobile-sheet .inside {
        max-height: calc(min(75vh, 560px) - 52px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    #newsai_sidebar.postbox.nros-mobile-sheet.nros-mobile-open {
        transform: translateY(0);
    }
    #newsai_sidebar .nros-mobile-sheet-handle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        width: 100%;
        height: 44px;
        border: 0;
        border-bottom: 1px solid var(--nros-border, #e2e4e7);
        background: var(--nros-bg-muted, #f6f7f7);
        color: var(--nros-text, #1d2327);
        font-weight: 600;
        cursor: pointer;
    }
}