/* ============================================================
   PWA UI — My 0D1'$
   Tombol install, toast update, panduan iOS
   ============================================================ */

.pwa-install {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 100000;
    align-items: center;
    gap: 11px;
    padding: 12px 14px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.05);
    font-family: 'Poppins', Arial, sans-serif;
    cursor: pointer;
    animation: pwaSlideUp 0.4s cubic-bezier(0.34, 1.3, 0.64, 1);
    transition: transform 0.2s, box-shadow 0.2s;
    max-width: 420px;
    margin: 0 auto;
}
.pwa-install:hover { transform: translateY(-3px); box-shadow: 0 16px 44px rgba(0, 0, 0, 0.22); }
.pwa-install:active { transform: translateY(-1px); }
.pwa-install:focus-visible { outline: 3px solid var(--warna-primer, #ef4444); outline-offset: 2px; }

.pwa-install .pwa-i {
    width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
    background: linear-gradient(135deg, var(--warna-primer, #ef4444), var(--warna-sekunder, #b91c1c));
    display: flex; align-items: center; justify-content: center; font-size: 19px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}
.pwa-install .pwa-t { flex: 1; min-width: 0; }
.pwa-install .pwa-t b { display: block; font-size: 13.5px; font-weight: 700; color: #333; line-height: 1.3; }
.pwa-install .pwa-t small { display: block; font-size: 11px; color: #999; margin-top: 1px; }

.pwa-install .pwa-x {
    background: #f5f5f5; border: none; color: #999;
    width: 28px; height: 28px; border-radius: 8px; cursor: pointer;
    font-size: 13px; flex-shrink: 0; font-family: inherit; line-height: 1;
    display: flex; align-items: center; justify-content: center;
}
.pwa-install .pwa-x:hover { background: #e5e5e5; color: #666; }

@keyframes pwaSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Toast update */
.pwa-toast {
    position: fixed;
    top: 16px; right: 16px;
    z-index: 100001;
    display: flex; align-items: center; gap: 10px;
    padding: 11px 13px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
    font-family: 'Poppins', Arial, sans-serif;
    opacity: 0; transform: translateX(30px);
    transition: opacity 0.3s, transform 0.3s;
    max-width: 340px;
}
.pwa-toast.show { opacity: 1; transform: translateX(0); }
.pwa-toast-ic { font-size: 20px; flex-shrink: 0; }
.pwa-toast-t { flex: 1; min-width: 0; }
.pwa-toast-t b { display: block; font-size: 13px; font-weight: 700; color: #333; }
.pwa-toast-t small { display: block; font-size: 11px; color: #999; margin-top: 1px; }
.pwa-toast-btn {
    background: linear-gradient(135deg, var(--warna-primer, #ef4444), var(--warna-sekunder, #b91c1c));
    color: white; border: none; padding: 8px 15px; border-radius: 9px;
    font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; flex-shrink: 0;
}
.pwa-toast-btn:hover { filter: brightness(1.08); }
.pwa-toast-x {
    background: #f5f5f5; border: none; color: #999; width: 24px; height: 24px;
    border-radius: 7px; cursor: pointer; font-size: 12px; flex-shrink: 0;
    font-family: inherit; line-height: 1;
    display: flex; align-items: center; justify-content: center;
}

/* Overlay panduan iOS */
.pwa-ov {
    position: fixed; inset: 0; z-index: 100002;
    background: rgba(0, 0, 0, 0.6);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    font-family: 'Poppins', Arial, sans-serif;
    animation: pwaFade 0.25s ease;
}
@keyframes pwaFade { from { opacity: 0; } to { opacity: 1; } }

.pwa-ov-card {
    background: white; border-radius: 20px; padding: 28px 24px;
    max-width: 360px; width: 100%; text-align: center; position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: pwaPop 0.3s cubic-bezier(0.34, 1.3, 0.64, 1);
}
@keyframes pwaPop { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

.pwa-ov-x {
    position: absolute; top: 12px; right: 12px;
    background: #f5f5f5; border: none; color: #999; width: 30px; height: 30px;
    border-radius: 9px; cursor: pointer; font-size: 14px; font-family: inherit;
}
.pwa-ov-ic { font-size: 44px; margin-bottom: 10px; }
.pwa-ov-card h3 { font-size: 17px; font-weight: 800; color: #333; margin-bottom: 16px; }
.pwa-steps { text-align: left; margin-bottom: 20px; padding-left: 22px; }
.pwa-steps li {
    font-size: 13px; color: #666; line-height: 1.6; margin-bottom: 9px;
    padding-left: 3px;
}
.pwa-steps b { color: #333; }
.pwa-share { display: inline-block; }
.pwa-ov-btn {
    width: 100%; padding: 12px; border: none; border-radius: 11px;
    background: linear-gradient(135deg, var(--warna-primer, #ef4444), var(--warna-sekunder, #b91c1c));
    color: white; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit;
}

/* Mobile */
@media (max-width: 560px) {
    .pwa-install { left: 10px; right: 10px; bottom: 10px; padding: 10px 12px; border-radius: 14px; }
    .pwa-install .pwa-i { width: 36px; height: 36px; font-size: 17px; }
    .pwa-install .pwa-t b { font-size: 12.5px; }
    .pwa-toast { top: 10px; left: 10px; right: 10px; max-width: none; }
}

/* Print */
@media print {
    .pwa-install, .pwa-toast, .pwa-ov { display: none !important; }
}
