/* update-popup.css (Versi FORCE UPDATE / PAKSAAN) */

/* ================================================= */
/* POPUP NOTIFIKASI (MODAL STYLE) */
/* ================================================= */
.update-popup-container {
    position: fixed;
    /* Default posisi (sebelum muncul) */
    top: 50%;
    left: 50%;
    transform: translate(-50%, 50px); /* Sedikit ke bawah untuk animasi */
    
    background-color: #ffffff;
    color: #2c3e50;
    padding: 25px; /* Padding lebih besar */
    border-radius: 16px; /* Sudut lebih bulat */
    border: none;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    z-index: 20000; /* Z-index sangat tinggi */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    flex-direction: column; /* Ubah jadi vertikal agar rapi di tengah */
    align-items: center;
    text-align: center;
    gap: 20px;
    width: 90%;
    max-width: 320px; /* Ukuran kotak yang pas */
    
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* KELAS AKTIF (SAAT UPDATE TERDETEKSI) */
.update-popup-container.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%); /* Tepat di tengah layar */
}

/* === BAGIAN KUNCI: BACKDROP GELAP (FORCE MODE) === */
/* Ini membuat layar belakang gelap dan tidak bisa diklik */
.update-popup-container.show::before {
    content: '';
    position: fixed;
    top: -500vw; /* Melebar jauh ke luar layar */
    left: -500vw;
    right: -500vw;
    bottom: -500vw;
    background-color: rgba(44, 62, 80, 0.92); /* Gelap pekat */
    backdrop-filter: blur(8px); /* Efek blur pada background */
    z-index: -1; /* Di belakang kotak putih */
    pointer-events: auto; /* Menangkap semua klik di luar kotak */
}

/* Gaya untuk ikon */
.update-popup-container .icon {
    font-size: 0; /* Reset font size for SVG container */
    color: #e84393;
    background-color: #fce4ec; /* Lingkaran background tipis */
    padding: 15px;
    border-radius: 50%;
    margin-bottom: 5px;
    animation: pulse 2s infinite;
}

/* Grup teks */
.update-popup-container .text-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.update-popup-container .text-group .title {
    font-size: 18px;
    font-weight: 700;
    color: #FFFFFF;
}

.update-popup-container .text-group .subtitle {
    font-size: 14px;
    color: #7f8c8d;
    line-height: 1.5;
}

/* Tombol Update */
.update-popup-container .refresh-button {
    background: linear-gradient(45deg, #e84393, #d63031);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 50px; /* Tombol bulat penuh */
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    width: 100%; /* Tombol lebar penuh */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(232, 67, 147, 0.4);
}

.update-popup-container .refresh-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 67, 147, 0.6);
}

/* ================================================= */
/* MODAL OVERLAY UNTUK PROSES UPDATE (LOADING) */
/* ================================================= */
.update-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #2c3e50; /* Solid color saat loading */
    z-index: 20001; /* Di atas popup notifikasi */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    visibility: hidden;
}

.update-overlay.show {
    opacity: 1;
    visibility: visible;
}

.update-modal-content {
    background-color: white;
    color: #333;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 380px;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.update-overlay.show .update-modal-content {
    transform: scale(1);
}

.update-modal-header {
    background-color: #e84393;
    padding: 30px 20px;
}

.update-modal-icon {
    width: 60px;
    height: 60px;
    stroke: white;
    animation: rocket-fly 1.5s ease-in-out infinite;
}

.update-modal-body {
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.update-modal-body .main-text {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}

.update-modal-body .sub-text {
    font-size: 14px;
    color: #7f8c8d;
    line-height: 1.5;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background-color: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.progress-bar-inner {
    width: 100%;
    height: 100%;
    background-color: #e84393;
    border-radius: 4px;
    transform: translateX(-100%);
    animation: progress-slide 2s ease-in-out infinite;
}

@keyframes rocket-fly {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes progress-slide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Media Query tidak diperlukan karena layout sudah responsif (centered) */