/**
 * JNews Hausa — Extra UI Elements CSS
 * css/extras.css
 */

/* ============================================================
   BACK TO TOP BUTTON
   ============================================================ */
#jnews-back-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 46px;
    height: 46px;
    background: #e8192c;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
    z-index: 9999;
    box-shadow: 0 4px 20px rgba(232, 25, 44, 0.4);
}

#jnews-back-top svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

#jnews-back-top.visible {
    opacity: 1;
    transform: translateY(0);
}

#jnews-back-top:hover {
    background: #b5111e;
    transform: translateY(-3px) !important;
}

/* ============================================================
   READING PROGRESS BAR
   ============================================================ */
#jnews-reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.06);
    z-index: 99999;
}

#jnews-progress-bar {
    height: 100%;
    background: #e8192c;
    width: 0%;
    transition: width 0.1s linear;
}

/* ============================================================
   DARK MODE TOGGLE BUTTON (Standalone)
   ============================================================ */
.jnews-dark-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    padding: 4px 10px;
    cursor: pointer;
    font-size: 14px;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.2s ease;
    vertical-align: middle;
}

.jnews-dark-btn:hover {
    background: rgba(255, 255, 255, 0.18);
}

body:not(.jeg_dark_mode) .icon-dark { display: none; }
body.jeg_dark_mode .icon-light { display: none; }

/* ============================================================
   STICKY NAV SCROLLED STATE
   ============================================================ */
.jeg_main_nav.scrolled,
.jeg_navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
}

/* ============================================================
   BODY LOADED — FADE IN ANIMATION
   ============================================================ */
body:not(.jnews-loaded) .jeg_post {
    opacity: 0;
}

body.jnews-loaded .jeg_post {
    opacity: 1;
}

/* ============================================================
   LIKE BUTTON ANIMATION
   ============================================================ */
.jnews-hausa-like.animating {
    transform: scale(1.3);
    transition: transform 0.2s ease;
}

.jnews-hausa-like.liked .like-icon {
    color: #e8192c;
}

/* ============================================================
   BREAKING NEWS INLINE
   ============================================================ */
.jnews-hausa-breaking {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #e8192c;
    color: white;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    margin: 12px 0;
}

.jnews-hausa-breaking .breaking-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: blink 1s infinite;
    flex-shrink: 0;
}

.jnews-hausa-breaking .breaking-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.9;
    flex-shrink: 0;
}

.jnews-hausa-breaking a {
    color: white !important;
    text-decoration: none !important;
    flex: 1;
}

.jnews-hausa-breaking a:hover {
    text-decoration: underline !important;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}

/* ============================================================
   READING TIME BADGE
   ============================================================ */
.reading-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #999;
    background: #f4f4f4;
    padding: 2px 8px;
    border-radius: 20px;
}

.reading-time::before {
    content: '⏱';
    font-size: 10px;
}

/* ============================================================
   DARK MODE EXTRAS
   ============================================================ */
body.jeg_dark_mode #jnews-reading-progress {
    background: rgba(255, 255, 255, 0.06);
}

body.jeg_dark_mode .jnews-hausa-breaking {
    box-shadow: 0 2px 12px rgba(232, 25, 44, 0.3);
}

body.jeg_dark_mode .reading-time {
    background: #2a2a2a;
    color: #888;
}

/* ============================================================
   RESPONSIVE EXTRAS
   ============================================================ */
@media (max-width: 768px) {
    #jnews-back-top {
        bottom: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
    }

    #jnews-back-top svg {
        width: 18px;
        height: 18px;
    }
}
