/* ===========================================================
   HOMOCURE LIVE NEWS — floating pill, popup panel, live section
=========================================================== */

/* ---------- Pulsing live dot ---------- */
.hn-dot{
    display:inline-block;
    width:10px;
    height:10px;
    border-radius:50%;
    background:#ef4444;
    box-shadow:0 0 0 0 rgba(239,68,68,.6);
    animation:hnPulse 1.6s infinite;
    flex-shrink:0;
}

@keyframes hnPulse{
    0%{ box-shadow:0 0 0 0 rgba(239,68,68,.55); }
    70%{ box-shadow:0 0 0 10px rgba(239,68,68,0); }
    100%{ box-shadow:0 0 0 0 rgba(239,68,68,0); }
}

/* ---------- Floating pill (bottom-left) ---------- */
.hn-pill{
    position:fixed;
    left:20px;
    bottom:20px;
    z-index:9990;
    display:flex;
    align-items:center;
    gap:10px;
    max-width:min(340px, calc(100vw - 100px));
    padding:11px 16px;
    background:#ffffff;
    color:#14532d;
    border:1px solid rgba(22,163,74,.35);
    border-radius:50px;
    box-shadow:0 10px 30px rgba(0,0,0,.16);
    font-family:inherit;
    font-size:13px;
    font-weight:600;
    cursor:pointer;
    transition:transform .25s ease, box-shadow .25s ease;
}

.hn-pill:hover{
    transform:translateY(-3px);
    box-shadow:0 14px 34px rgba(22,163,74,.28);
}

.hn-pill-label{
    font-weight:800;
    letter-spacing:.4px;
    color:#dc2626;
    text-transform:uppercase;
    font-size:11px;
    flex-shrink:0;
}

.hn-pill-text{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    transition:opacity .25s ease;
}

.hn-pill-text.hn-fade{ opacity:0; }

/* ---------- Popup panel ---------- */
.hn-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.35);
    z-index:9991;
    opacity:0;
    visibility:hidden;
    transition:opacity .3s ease, visibility .3s ease;
}

.hn-overlay.open{
    opacity:1;
    visibility:visible;
}

.hn-panel{
    position:fixed;
    left:20px;
    bottom:20px;
    z-index:9992;
    width:min(420px, calc(100vw - 32px));
    max-height:min(620px, 82vh);
    display:flex;
    flex-direction:column;
    background:#ffffff;
    border-radius:20px;
    box-shadow:0 25px 60px rgba(0,0,0,.28);
    overflow:hidden;
    transform:translateY(30px) scale(.96);
    opacity:0;
    visibility:hidden;
    transition:all .3s ease;
}

.hn-panel.open{
    transform:translateY(0) scale(1);
    opacity:1;
    visibility:visible;
}

.hn-panel-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:16px 18px;
    background:linear-gradient(90deg,#16a34a,#22c55e);
    color:#ffffff;
}

.hn-panel-head h3{
    display:flex;
    align-items:center;
    gap:10px;
    margin:0;
    font-size:16px;
    font-weight:700;
    color:#ffffff;
}

.hn-panel-head .hn-dot{ background:#fff; animation:none; }

.hn-close{
    width:32px;
    height:32px;
    border:none;
    border-radius:50%;
    background:rgba(255,255,255,.22);
    color:#ffffff;
    font-size:18px;
    line-height:1;
    cursor:pointer;
    transition:background .2s;
}

.hn-close:hover{ background:rgba(255,255,255,.4); }

.hn-panel-meta{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:10px 18px;
    font-size:12px;
    color:#6b7280;
    background:#f0fdf4;
    border-bottom:1px solid #dcfce7;
}

.hn-refresh{
    border:none;
    background:none;
    color:#16a34a;
    font-family:inherit;
    font-size:12px;
    font-weight:700;
    cursor:pointer;
}

.hn-list{
    list-style:none;
    margin:0;
    padding:6px 0;
    overflow-y:auto;
}

.hn-list li a{
    display:block;
    padding:14px 18px;
    border-bottom:1px solid #f1f5f9;
    text-decoration:none;
    color:#111827;
    transition:background .2s;
}

.hn-list li a:hover{ background:#f0fdf4; }

.hn-item-title{
    display:block;
    font-size:14px;
    font-weight:600;
    line-height:1.45;
    margin-bottom:6px;
}

.hn-item-meta{
    display:flex;
    gap:8px;
    align-items:center;
    font-size:12px;
    color:#6b7280;
}

.hn-item-meta .hn-src{
    color:#16a34a;
    font-weight:700;
}

.hn-state{
    padding:34px 20px;
    text-align:center;
    color:#6b7280;
    font-size:14px;
}

/* ---------- Live section (before footer) ---------- */
.hn-live{
    padding:60px 0;
    background:linear-gradient(135deg,#f0fdf4,#ecfeff);
}

.hn-live-head{
    display:flex;
    align-items:center;
    justify-content:center;
    flex-wrap:wrap;
    gap:10px;
    margin-bottom:22px;
    font-size:14px;
    font-weight:800;
    letter-spacing:1px;
    text-transform:uppercase;
    color:#14532d;
}

.hn-live-head .hn-live-tag{
    padding:4px 12px;
    border-radius:50px;
    background:#dc2626;
    color:#ffffff;
    font-size:12px;
}

.hn-live-card{
    display:block;
    max-width:820px;
    margin:0 auto;
    padding:30px 32px;
    background:#ffffff;
    border-radius:20px;
    border:1px solid rgba(22,163,74,.2);
    box-shadow:0 14px 40px rgba(22,163,74,.12);
    text-decoration:none;
    color:#111827;
    min-height:150px;
    transition:opacity .25s ease, transform .25s ease, box-shadow .25s ease;
}

.hn-live-card:hover{
    box-shadow:0 18px 46px rgba(22,163,74,.22);
}

.hn-live-card.hn-fade{
    opacity:0;
    transform:translateY(10px);
}

.hn-live-card .hn-src{
    display:inline-block;
    margin-bottom:10px;
    font-size:12px;
    font-weight:700;
    color:#16a34a;
    text-transform:uppercase;
    letter-spacing:.6px;
}

.hn-live-card .hn-title{
    margin:0 0 14px;
    font-size:clamp(18px, 2.4vw, 24px);
    line-height:1.4;
    color:#0f172a;
}

.hn-live-card .hn-time{
    font-size:13px;
    color:#6b7280;
}

.hn-live-foot{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:18px;
    margin-top:16px;
    font-size:12px;
    color:#6b7280;
}

.hn-view-all{
    border:none;
    background:none;
    color:#16a34a;
    font-family:inherit;
    font-weight:700;
    font-size:13px;
    cursor:pointer;
    text-decoration:underline;
}

/* ---------- Mobile ---------- */
@media (max-width:768px){
    .hn-pill{
        left:12px;
        bottom:12px;
        max-width:calc(100vw - 84px);
        padding:10px 14px;
    }
    .hn-panel{ left:16px; right:16px; bottom:12px; width:auto; }
    .hn-live-card{ padding:22px 20px; }
}

@media (prefers-reduced-motion: reduce){
    .hn-dot{ animation:none; }
    .hn-pill, .hn-panel, .hn-live-card, .hn-overlay{ transition:none; }
}
