﻿/* ==== OVERLAY ==== */
.custom-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 20, 60, 0.55);
    backdrop-filter: blur(8px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: hidden;
}

    /* ==== BACKGROUND FLOATING GRADIENTS ==== */
    .custom-modal-overlay::before,
    .custom-modal-overlay::after {
        content: "";
        position: absolute;
        width: 600px;
        height: 600px;
        background: radial-gradient(circle, rgba(13,110,253,0.4), transparent 60%);
        animation: floatBg 10s infinite linear;
        z-index: -1;
    }

    .custom-modal-overlay::before {
        top: -200px;
        left: -150px;
    }

    .custom-modal-overlay::after {
        bottom: -200px;
        right: -150px;
        animation-delay: -5s;
    }

@keyframes floatBg {
    0% {
        transform: translateY(0) rotate(0);
    }

    50% {
        transform: translateY(40px) rotate(45deg);
    }

    100% {
        transform: translateY(0) rotate(0);
    }
}


/* ==== MODAL BOX ==== */
.custom-modal {
    width: 100%;
    max-width: 480px;
    background: #ffffff;
    border-radius: 18px;
    padding: 30px;
    position: relative;
    animation: modalPop 0.45s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 15px 35px rgba(0,0,0,0.18);
    overflow: hidden;
}

    /* Animated Gradient Border */
    .custom-modal::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 18px;
        padding: 2px;
        background: linear-gradient(120deg, #0d6efd, #0b52c2, #0d6efd);
        background-size: 300% 300%;
        animation: borderMove 6s ease infinite;
        z-index: -1;
        -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
    }

@keyframes borderMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Entrance Animation */
@keyframes modalPop {
    0% {
        opacity: 0;
        transform: scale(0.92);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}


/* ==== CLOSE BUTTON ==== */
.custom-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 26px;
    border: none;
    background: none;
    cursor: pointer;
    color: #0d3ea5;
    transition: 0.2s;
}

    .custom-modal-close:hover {
        transform: scale(1.25);
    }


/* ==== HEADER ==== */
.custom-modal-header {
    text-align: center;
}

/* Icon wave animation */
.modal-icon {
    font-size: 55px;
    color: #0d6efd;
    margin-bottom: 12px;
    animation: iconWave 2.6s ease-in-out infinite;
}

@keyframes iconWave {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 0px #72a7ff);
    }

    50% {
        transform: scale(1.08);
        filter: drop-shadow(0 0 8px #a4c6ff);
    }

    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0px #72a7ff);
    }
}

.custom-modal-header h2 {
    font-size: 23px;
    font-weight: 700;
    color: #0b2f78;
}


/* ==== BODY ==== */
.custom-modal-body {
    margin: 20px 0;
    font-size: 16px;
    color: #2e3b55;
    line-height: 1.6;
    text-align: center;
}


/* ==== FOOTER ==== */
.custom-modal-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ==== BUTTONS ==== */
.modal-btn {
    width: 100%;
    padding: 13px;
    border-radius: 12px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: 0.25s ease;
}

    /* Primary + Pulse animation */
    .modal-btn.primary {
        background: linear-gradient(135deg, #0d6efd, #0b52c2);
        color: white;
        animation: pulseBtn 2.4s infinite ease-in-out;
    }

@keyframes pulseBtn {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(13,110,253,0.4);
    }

    50% {
        transform: scale(1.03);
        box-shadow: 0 0 14px rgba(13,110,253,0.4);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(13,110,253,0.4);
    }
}

.modal-btn.primary:hover {
    opacity: .85;
}

.modal-btn.secondary {
    background: #eaf1ff;
    color: #0d3ea5;
}

    .modal-btn.secondary:hover {
        background: #d6e4ff;
    }
