/* Modal Container */
.modaljs-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Toast Container */
.modaljs-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

/* Overlay */
.modaljs-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: auto;
}

.modaljs-overlay.show {
    opacity: 1;
}

/* Modal Notification Box */
.modaljs-notification {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    min-width: 400px;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    opacity: 0;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.modaljs-notification.show {
    transform: scale(1);
    opacity: 1;
}

.modaljs-notification.hide {
    transform: scale(0.8);
    opacity: 0;
}

/* Icons */
.modaljs-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

/* Content */
.modaljs-content {
    flex: 1;
    color: #ffffff;
}

.modaljs-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.2;
}

.modaljs-message {
    font-size: 14px;
    color: #ffffff;
    line-height: 1.4;
}

/* Close Button */
.modaljs-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 16px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modaljs-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Success Modal */
.modaljs-notification.success {
    border-left: 4px solid #10b981;
}

.modaljs-notification.success .modaljs-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    animation: successPulse 2s infinite;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.modaljs-notification.success .modaljs-icon i {
    animation: successCheck 0.6s ease-out;
}

@keyframes successCheck {
    0% { transform: scale(0) rotate(0deg); }
    50% { transform: scale(1.2) rotate(0deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* Error Modal */
.modaljs-notification.error {
    border-left: 4px solid #ef4444;
}

.modaljs-notification.error .modaljs-icon {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    animation: errorShake 0.5s ease-in-out;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.modaljs-notification.error .modaljs-icon i {
    animation: errorX 0.6s ease-out;
}

@keyframes errorX {
    0% { transform: scale(0) rotate(0deg); }
    50% { transform: scale(1.2) rotate(0deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* Warning Modal */
.modaljs-notification.warning {
    border-left: 4px solid #f59e0b;
}

.modaljs-notification.warning .modaljs-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    animation: warningBounce 1s infinite;
}

@keyframes warningBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.modaljs-notification.warning .modaljs-icon i {
    font-weight: bold;
    animation: warningExclamation 0.6s ease-out;
}

@keyframes warningExclamation {
    0% { transform: scale(0); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Info Modal */
.modaljs-notification.info {
    border-left: 4px solid #3b82f6;
}

.modaljs-notification.info .modaljs-icon {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    animation: infoGlow 2s infinite;
}

@keyframes infoGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); }
}

.modaljs-notification.info .modaljs-icon i {
    font-weight: bold;
    animation: infoInfo 0.6s ease-out;
}

@keyframes infoInfo {
    0% { transform: scale(0) rotate(-180deg); }
    50% { transform: scale(1.2) rotate(-90deg); }
    100% { transform: scale(1) rotate(0deg); }
}

/* Progress bar */
.modaljs-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 16px 16px;
    transform-origin: left;
    animation: progressBar var(--duration) linear;
}

@keyframes progressBar {
    0% { transform: scaleX(1); }
    100% { transform: scaleX(0); }
}

/* Toast Styles */
.modaljs-toast {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 20px;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    overflow: hidden;
}

.modaljs-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.modaljs-toast.hide {
    transform: translateX(120%);
    opacity: 0;
}

.modaljs-toast .modaljs-icon {
    width: 32px;
    height: 32px;
    font-size: 16px;
}

.modaljs-toast .modaljs-title {
    font-size: 14px;
    margin-bottom: 2px;
}

.modaljs-toast .modaljs-message {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

/* Toast Colors */
.modaljs-toast.success { border-left: 3px solid #10b981; }
.modaljs-toast.error { border-left: 3px solid #ef4444; }
.modaljs-toast.warning { border-left: 3px solid #f59e0b; }
.modaljs-toast.info { border-left: 3px solid #3b82f6; }

/* Mobile responsive */
@media (max-width: 768px) {
    .modaljs-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .modaljs-toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        width: auto;
    }

    .modaljs-toast {
        width: 100%;
        max-width: none;
        min-width: auto;
    }

    .modaljs-notification {
        min-width: auto;
        max-width: none;
        margin-bottom: 8px;
    }

    .modaljs-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .modaljs-title {
        font-size: 15px;
    }

    .modaljs-message {
        font-size: 13px;
    }
}
