/* Custom popup notifikasi — mengikuti warna tema (.btn-primary / .modal-content) */

:root {
    --theme-popup-bg: #6b0c0c;
    --theme-popup-bg-soft: #490609;
    --theme-popup-border: #780a0f;
    --theme-popup-text: #ffffff;
    --theme-popup-muted: rgba(255, 255, 255, 0.78);
    --theme-popup-accent: #bc0707;
    --theme-popup-success: #23afa9;
    --theme-popup-warning: #b9b910;
    --theme-popup-error: #bc0707;
    --theme-popup-info: #27b4a3;
}

.theme-notif-overlay {
    position: fixed;
    inset: 0;
    z-index: 200000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.72);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.theme-notif-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.theme-notif-box {
    width: 100%;
    max-width: 420px;
    background: var(--theme-popup-bg);
    color: var(--theme-popup-text);
    border: 1px solid var(--theme-popup-border);
    border-radius: 0;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    padding: 28px 24px 22px;
    text-align: center;
    transform: translateY(12px) scale(0.98);
    transition: transform 0.22s ease;
}

.theme-notif-overlay.is-open .theme-notif-box {
    transform: translateY(0) scale(1);
}

.theme-notif-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 50%;
    border: 3px solid currentColor;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    line-height: 1;
    font-weight: 700;
}

.theme-notif-icon.is-success {
    color: var(--theme-popup-success);
}

.theme-notif-icon.is-warning {
    color: var(--theme-popup-warning);
}

.theme-notif-icon.is-error {
    color: var(--theme-popup-error);
}

.theme-notif-icon.is-info,
.theme-notif-icon.is-question {
    color: var(--theme-popup-info);
}

.theme-notif-icon.is-hidden {
    display: none;
}

.theme-notif-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--theme-popup-text);
    letter-spacing: 0.02em;
}

.theme-notif-body {
    font-size: 14px;
    line-height: 1.55;
    color: var(--theme-popup-muted);
    margin: 0 0 20px;
    word-break: break-word;
}

.theme-notif-body:empty {
    display: none;
}

.theme-notif-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.theme-notif-actions .btn {
    min-width: 110px;
    border-radius: 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: inline-block;
    padding: 10px 18px;
    cursor: pointer;
    border: 1px solid transparent;
    font-size: 13px;
    line-height: 1.3;
    text-decoration: none;
}

.theme-notif-actions .btn-primary,
.theme-notif-actions .theme-notif-confirm {
    background: var(--theme-popup-bg-soft);
    border-color: var(--theme-popup-border);
    color: #fff !important;
}

.theme-notif-actions .btn-primary:hover,
.theme-notif-actions .theme-notif-confirm:hover {
    filter: brightness(1.12);
    color: #fff !important;
}

.theme-notif-actions .theme-notif-cancel {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
}

.theme-notif-actions .theme-notif-cancel:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

/* Image / banner mode */
.theme-notif-box.is-media {
    max-width: min(520px, 92vw);
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.theme-notif-box.is-media .theme-notif-body {
    margin: 0;
}

.theme-notif-box.is-media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0;
}

body.theme-notif-open {
    overflow: hidden;
}

@media (max-width: 480px) {
    .theme-notif-box {
        padding: 22px 16px 18px;
    }

    .theme-notif-title {
        font-size: 18px;
    }

    .theme-notif-body {
        font-size: 13px;
    }
}

/* Refresh balance — ikon berputar saat loading */
@keyframes balance-refresh-spin {
    from {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    to {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

.icon-refresh-2.is-spinning,
.i-refresh.is-spinning,
.btn-refresh-balance.is-spinning .icon-refresh-2,
.btn-getbalance.is-spinning .icon-refresh-2 {
    display: inline-block !important;
    -webkit-animation: balance-refresh-spin 0.7s linear infinite;
    animation: balance-refresh-spin 0.7s linear infinite;
    pointer-events: none;
}
