/* ============================================================
   POPUP INFORMASI - Glassmorphism + Clean Modern
   Mobile-First Design | SPPT JHEAINS 2026
   ============================================================ */

/* === OVERLAY === */
.sppt-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 10000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}
.sppt-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* === CONTAINER (Mobile-First) === */
.sppt-popup-container {
    width: 100%;
    max-width: 460px;
    min-width: 0;
    flex-shrink: 1;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    box-sizing: border-box;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}
.sppt-popup-overlay.active .sppt-popup-container {
    transform: translateY(0) scale(1);
}

/* === HEADER (Gradient by Priority) === */
.sppt-popup-header {
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    color: #fff;
}
.sppt-popup-header[data-priority="biasa"] {
    background: linear-gradient(135deg, #1565c0, #1e88e5);
}
.sppt-popup-header[data-priority="penting"] {
    background: linear-gradient(135deg, #e65100, #f9a825);
}
.sppt-popup-header[data-priority="kritikal"] {
    background: linear-gradient(135deg, #b71c1c, #c62828);
}
.sppt-popup-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.sppt-popup-header-icon {
    width: 28px;
    height: 28px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}
.sppt-popup-header-title {
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sppt-popup-counter {
    background: rgba(255,255,255,0.25);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    flex-shrink: 0;
}
.sppt-popup-close-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
    margin-left: 8px;
}
.sppt-popup-close-btn:hover {
    background: rgba(255,255,255,0.4);
}

/* === SLIDES === */
.sppt-popup-slides-wrapper {
    overflow: hidden;
    position: relative;
    width: 100%;
}
.sppt-popup-slides-track {
    display: flex;
    width: 100%;
    transition: transform 0.4s ease;
}
.sppt-popup-slide {
    min-width: 100%;
    max-width: 100%;
    flex-shrink: 0;
    box-sizing: border-box;
    overflow: hidden;
}

/* === BANNER === */
.sppt-popup-banner {
    width: 100%;
    max-width: 100%;
    max-height: 240px;
    object-fit: cover;
    display: block;
}
.sppt-popup-youtube-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
}
.sppt-popup-youtube-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* === CONTENT === */
.sppt-popup-content {
    padding: 14px 16px 10px;
    box-sizing: border-box;
}
.sppt-popup-kategori {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}
.sppt-popup-tajuk {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.35;
    margin-bottom: 6px;
}
.sppt-popup-ringkasan {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.55;
    margin-bottom: 8px;
}
.sppt-popup-meta {
    font-size: 0.7rem;
    color: #aaa;
}
.sppt-popup-meta i {
    margin-right: 3px;
}

/* === CTA BUTTONS === */
.sppt-popup-actions {
    padding: 8px 16px 14px;
    display: flex;
    gap: 8px;
    box-sizing: border-box;
    min-width: 0;
}
.sppt-popup-btn-read {
    flex: 1;
    min-width: 0;
    padding: 9px 10px;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.25s;
    text-align: center;
    text-decoration: none;
    display: block;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sppt-popup-btn-read[data-priority="biasa"] {
    background: linear-gradient(135deg, #1565c0, #1e88e5);
}
.sppt-popup-btn-read[data-priority="penting"] {
    background: linear-gradient(135deg, #e65100, #f9a825);
}
.sppt-popup-btn-read[data-priority="kritikal"] {
    background: linear-gradient(135deg, #b71c1c, #c62828);
}
.sppt-popup-btn-read:hover {
    opacity: 0.9;
    color: #fff;
    text-decoration: none;
}
.sppt-popup-btn-dismiss {
    padding: 9px 14px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font-size: 0.8rem;
    font-weight: 500;
    color: #888;
    cursor: pointer;
    transition: all 0.25s;
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-block;
}
.sppt-popup-btn-dismiss:hover {
    border-color: #bbb;
    color: #555;
    background: #f5f5f5;
}

/* === NAVIGATION ARROWS === */
.sppt-popup-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #555;
    z-index: 2;
    transition: all 0.2s;
}
.sppt-popup-nav-arrow:hover {
    background: #fff;
    box-shadow: 0 3px 12px rgba(0,0,0,0.25);
}
.sppt-popup-nav-prev { left: 6px; }
.sppt-popup-nav-next { right: 6px; }

/* === FOOTER (Dots + Timer) === */
.sppt-popup-footer {
    padding: 8px 16px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}
.sppt-popup-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}
.sppt-popup-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    transition: all 0.3s;
    cursor: pointer;
}
.sppt-popup-dot.active {
    background: #1e88e5;
    width: 20px;
    border-radius: 4px;
}
.sppt-popup-timer-bar {
    width: 80px;
    height: 3px;
    background: #eee;
    border-radius: 2px;
    overflow: hidden;
}
.sppt-popup-timer-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: width linear;
}
.sppt-popup-timer-fill[data-priority="biasa"] {
    background: linear-gradient(90deg, #1565c0, #1e88e5);
}
.sppt-popup-timer-fill[data-priority="penting"] {
    background: linear-gradient(90deg, #e65100, #f9a825);
}
.sppt-popup-timer-fill[data-priority="kritikal"] {
    background: linear-gradient(90deg, #b71c1c, #e53935);
}

/* === RESPONSIVE: Desktop === */
@media (min-width: 769px) {
    .sppt-popup-container {
        max-width: 480px;
    }
    .sppt-popup-banner {
        max-height: 300px;
    }
    .sppt-popup-content {
        padding: 16px 20px 12px;
    }
    .sppt-popup-actions {
        padding: 8px 20px 16px;
    }
    .sppt-popup-tajuk {
        font-size: 1rem;
    }
    .sppt-popup-ringkasan {
        font-size: 0.82rem;
    }
    .sppt-popup-nav-arrow {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}
