/* ===============================
   BUXNESIA POPUP OVERLAY
================================ */

.popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background:
        radial-gradient(circle at center, rgba(34,211,238,.14), transparent 36%),
        rgba(3,7,18,.78);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.popup-overlay.hidden {
    display: none;
}

/* ===============================
   MODAL BOX
================================ */

.popup-modal {
    position: relative;
    overflow: hidden;

    width: 100%;
    max-width: 440px;

    color: #e5e7eb;

    border-radius: 26px;
    border: 1px solid rgba(255,255,255,.12);

    background:
        linear-gradient(180deg, rgba(15,23,42,.98), rgba(7,11,24,.98));

    box-shadow:
        0 28px 90px rgba(0,0,0,.55),
        inset 0 1px 0 rgba(255,255,255,.08);

    animation: popupScale .22s ease;
}

.popup-modal::before {
    content: "";
    position: absolute;
    right: -80px;
    top: -80px;

    width: 180px;
    height: 180px;

    border-radius: 50%;

    background: rgba(34,211,238,.12);
    filter: blur(28px);
    pointer-events: none;
}

@keyframes popupScale {
    from {
        transform: scale(.94) translateY(10px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* ===============================
   HEADER
================================ */

.popup-header {
    position: relative;
    z-index: 1;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;

    padding: 18px 20px;

    border-bottom: 1px solid rgba(255,255,255,.09);
}

.popup-header h3 {
    margin: 0;

    color: #ffffff;
    font-size: 17px;
    font-weight: 900;
    letter-spacing: -.02em;
}

.popup-close {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(255,255,255,.10);
    border-radius: 50%;

    background: rgba(255,255,255,.055);

    color: #94a3b8;
    font-size: 22px;
    line-height: 1;

    cursor: pointer;
    transition: .25s ease;
}

.popup-close:hover {
    color: #ffffff;
    background: rgba(251,113,133,.16);
    border-color: rgba(251,113,133,.35);
    transform: rotate(90deg);
}

/* ===============================
   BODY
================================ */

.popup-body {
    position: relative;
    z-index: 1;

    padding: 20px;

    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.7;
}

.popup-body p {
    margin: 5px 0;
    color: #cbd5e1;
}

.popup-body hr {
    border: none;
    border-top: 1px solid rgba(255,255,255,.10);
    margin: 14px 0;
}

.popup-body strong {
    color: #ffffff;
    font-weight: 900;
}

.popup-body .total {
    display: inline-block;

    margin-top: 4px;

    color: #22d3ee;
    font-size: 18px;
    font-weight: 950;
}

/* ===============================
   FOOTER / ACTIONS
================================ */

.popup-footer {
    position: relative;
    z-index: 1;

    padding: 16px 20px 20px;

    display: flex;
    gap: 10px;
    justify-content: flex-end;

    border-top: 1px solid rgba(255,255,255,.09);
}

/* ===============================
   BUTTONS
================================ */

.popup-btn {
    min-height: 42px;

    padding: 11px 16px;

    border: none;
    border-radius: 14px;

    font-size: 14px;
    font-weight: 900;

    cursor: pointer;
    transition: .25s ease;
}

.popup-btn:hover {
    transform: translateY(-2px);
}

.popup-btn.primary {
    color: #07111f;
    background: linear-gradient(135deg, #22d3ee, #facc15);
    box-shadow: 0 14px 32px rgba(34,211,238,.20);
}

.popup-btn.secondary {
    color: #e5e7eb;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
}

.popup-btn.danger {
    color: #ffffff;
    background: linear-gradient(135deg, #fb7185, #ef4444);
    box-shadow: 0 14px 32px rgba(239,68,68,.18);
}

/* ===============================
   STATUS COLOR
================================ */

.popup-info {
    border-top: 4px solid #22d3ee;
}

.popup-success {
    border-top: 4px solid #34d399;
}

.popup-error {
    border-top: 4px solid #fb7185;
}

.popup-loading {
    border-top: 4px solid #facc15;
}

/* ===============================
   LOADING SPINNER
================================ */

.popup-loading-spinner {
    width: 38px;
    height: 38px;

    margin: 14px auto;

    border: 4px solid rgba(255,255,255,.12);
    border-top-color: #22d3ee;
    border-radius: 50%;

    animation: spin .8s linear infinite;

    box-shadow: 0 0 24px rgba(34,211,238,.20);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===============================
   RESPONSIVE
================================ */

@media (max-width: 480px) {
    .popup-modal {
        max-width: 100%;
        border-radius: 24px;
    }

    .popup-header,
    .popup-body {
        padding-left: 18px;
        padding-right: 18px;
    }

    .popup-footer {
        padding: 14px 18px 18px;
        flex-direction: column-reverse;
    }

    .popup-btn {
        width: 100%;
    }
}