/* Modern Modal Styles */

.modern-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modern-modal {
    background: white;
    border-radius: 20px;
    padding: 50px 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Close Button */
.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 16px;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg);
}

/* Modal Text */
.modern-modal h2 {
    font-size: 28px;
    font-weight: 700;
    color: #242424;
    margin: 25px 0 15px;
}

.modern-modal h3 {
    font-size: 22px;
    font-weight: 600;
    color: #242424;
    margin: 20px 0 10px;
}

.modern-modal p {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Loading Modal */
.loading-logo {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Success Icon */
.modal-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto;
}

.success-checkmark {
    width: 100px;
    height: 100px;
    margin: 0 auto;
}

.check-icon {
    width: 100px;
    height: 100px;
    position: relative;
    border-radius: 50%;
    box-sizing: content-box;
    border: 4px solid #4CAF50;
}

.check-icon::before {
    top: 3px;
    left: -2px;
    width: 30px;
    transform-origin: 100% 50%;
    border-radius: 100px 0 0 100px;
}

.check-icon::after {
    top: 0;
    left: 30px;
    width: 60px;
    transform-origin: 0 50%;
    border-radius: 0 100px 100px 0;
    animation: rotate-circle 4.25s ease-in;
}

.icon-line {
    height: 5px;
    background-color: #4CAF50;
    display: block;
    border-radius: 2px;
    position: absolute;
    z-index: 10;
}

.icon-line.line-tip {
    top: 46px;
    left: 14px;
    width: 25px;
    transform: rotate(45deg);
    animation: icon-line-tip 0.75s;
}

.icon-line.line-long {
    top: 38px;
    right: 8px;
    width: 47px;
    transform: rotate(-45deg);
    animation: icon-line-long 0.75s;
}

.icon-circle {
    top: -4px;
    left: -4px;
    z-index: 10;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    position: absolute;
    box-sizing: content-box;
    border: 4px solid rgba(76, 175, 80, .5);
}

.icon-fix {
    top: 8px;
    width: 5px;
    left: 26px;
    z-index: 1;
    height: 85px;
    position: absolute;
    transform: rotate(-45deg);
    background-color: white;
}

@keyframes rotate-circle {
    0% {
        transform: rotate(-45deg);
    }
    5% {
        transform: rotate(-45deg);
    }
    12% {
        transform: rotate(-405deg);
    }
    100% {
        transform: rotate(-405deg);
    }
}

@keyframes icon-line-tip {
    0% {
        width: 0;
        left: 1px;
        top: 19px;
    }
    54% {
        width: 0;
        left: 1px;
        top: 19px;
    }
    70% {
        width: 50px;
        left: -8px;
        top: 37px;
    }
    84% {
        width: 17px;
        left: 21px;
        top: 48px;
    }
    100% {
        width: 25px;
        left: 14px;
        top: 45px;
    }
}

@keyframes icon-line-long {
    0% {
        width: 0;
        right: 46px;
        top: 54px;
    }
    65% {
        width: 0;
        right: 46px;
        top: 54px;
    }
    84% {
        width: 55px;
        right: 0px;
        top: 35px;
    }
    100% {
        width: 47px;
        right: 8px;
        top: 38px;
    }
}

/* Error Icon */
.error-x {
    width: 100px;
    height: 100px;
    position: relative;
    border-radius: 50%;
    box-sizing: content-box;
    border: 4px solid #f44336;
}

.x-line {
    height: 5px;
    background-color: #f44336;
    display: block;
    border-radius: 2px;
    position: absolute;
    z-index: 10;
}

.x-line.x-line-left {
    top: 47px;
    left: 17px;
    width: 60px;
    transform: rotate(45deg);
    animation: x-line-animate 0.75s;
}

.x-line.x-line-right {
    top: 47px;
    left: 17px;
    width: 60px;
    transform: rotate(-45deg);
    animation: x-line-animate 0.75s;
}

.error-circle {
    top: -4px;
    left: -4px;
    z-index: 10;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    position: absolute;
    box-sizing: content-box;
    border: 4px solid rgba(244, 67, 54, .5);
}

@keyframes x-line-animate {
    0% {
        width: 0;
    }
    100% {
        width: 60px;
    }
}

/* Modal Info Box */
.modal-info {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    text-align: left;
}

.modal-info i {
    font-size: 24px;
    color: #4CAF50;
    flex-shrink: 0;
    margin-top: 3px;
}

.modal-info.error-info i {
    color: #f44336;
}

.modal-info div {
    flex: 1;
}

.modal-info strong {
    display: block;
    color: #242424;
    font-size: 16px;
    margin-bottom: 5px;
}

.modal-info span {
    display: block;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Modal Note */
.modal-note {
    background: rgba(0, 0, 0, 0.02);
    border-left: 3px solid #242424;
    padding: 12px 15px;
    margin-top: 20px;
    text-align: left;
}

.modal-note small {
    color: #666;
    font-size: 13px;
    line-height: 1.5;
    display: flex;
    gap: 8px;
}

.modal-note i {
    color: #242424;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Retry Button */
.modal-retry-btn {
    background: #000;
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.modal-retry-btn:hover {
    background: #242424;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Responsive */
@media (max-width: 767px) {
    .modern-modal {
        padding: 40px 25px;
        width: 95%;
    }

    .modern-modal h2 {
        font-size: 24px;
    }

    .modern-modal h3 {
        font-size: 20px;
    }

    .modern-modal p {
        font-size: 15px;
    }

    .modal-icon {
        width: 80px;
        height: 80px;
    }

    .success-checkmark,
    .check-icon,
    .error-x {
        width: 80px;
        height: 80px;
    }

    .icon-circle,
    .error-circle {
        width: 80px;
        height: 80px;
    }
}
