﻿@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css');

:root {
    --success-gradient: linear-gradient(135deg, #20d262 0%, #176c54 100%);
    --error-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --warning-gradient: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    --info-gradient: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
    --confirm-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-color: #00b09b;
    --error-color: #dc3545;
    --warning-color: #ff9f43;
    --info-color: #0dcaf0;
    --confirm-color: #6f42c1;
    --shadow-sm: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 20px 60px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.2);
}

.modern-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: modernFadeIn 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.modern-modal-content {
    position: relative;
    background: white;
    margin: 10% auto;
    padding: 0;
    width: 90%;
    max-width: 450px;
    border-radius: 25px;
    box-shadow: var(--shadow-lg);
    animation: modernSlideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
}

.modern-modal-header {
    padding: 30px 30px 20px 30px;
    text-align: center;
    position: relative;
}

.modern-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    animation: modernPulse 2s infinite;
}

    .modern-icon-wrapper i {
        font-size: 40px;
        color: white;
    }

.modern-modal-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    color: #2d3436;
}

.modern-modal-body {
    padding: 0 30px 20px 30px;
    text-align: center;
}

    .modern-modal-body p {
        margin: 0;
        font-size: 17px;
        line-height: 1.6;
        color: black;
    }

.modern-modal-footer {
    padding: 20px 30px 30px 30px;
    text-align: center;
    background: #f8f9fa;
}

.modern-close {
    position: absolute;
    right: 20px;
    top: 20px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    color: #666;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

    .modern-close:hover {
        background: rgba(0, 0, 0, 0.2);
        transform: rotate(90deg);
    }

.modern-btn {
    padding: 12px 35px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 8px;
    box-shadow: var(--shadow-sm);
}

    .modern-btn:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

    .modern-btn:active {
        transform: translateY(0);
    }

.modern-btn-ok {
    background: linear-gradient(135deg, #20d262 0%, #176c54 100%);
    color: white;
}

.modern-btn-confirm {
    background: var(--confirm-gradient);
    color: white;
    min-width: 100px;
}

.modern-btn-cancel {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #2d3436;
}

/* Alert Type Specific Styles */
.modern-success .modern-icon-wrapper {
    background: linear-gradient(135deg, #20d262 0%, #176c54 100%);
    box-shadow: 0 10px 20px rgba(0, 176, 155, 0.3);
}

.modern-error .modern-icon-wrapper {
    background: var(--error-gradient);
    box-shadow: 0 10px 20px rgba(245, 87, 108, 0.3);
}

.modern-warning .modern-icon-wrapper {
    background: var(--warning-gradient);
    box-shadow: 0 10px 20px rgba(253, 160, 133, 0.3);
}

.modern-info .modern-icon-wrapper {
    background: var(--info-gradient);
    box-shadow: 0 10px 20px rgba(161, 196, 253, 0.3);
}

.modern-confirm .modern-icon-wrapper {
    background: var(--confirm-gradient);
    box-shadow: 0 10px 20px rgba(111, 66, 193, 0.3);
}

/* Progress Bar for Auto-close */
.modern-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
    animation: modernProgress 3s linear;
}

/* Toast Notifications (Optional) */
.modern-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.modern-toast {
    background-color: white;
    color: white;
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    animation: modernToastIn 0.3s ease;
    max-width: 350px;
}

    .modern-toast i {
        font-size: 24px;
        margin-right: 15px;
    }
    .modern-toast.success {
        background-color: green;
    }
    .modern-toast.warning {
        background-color: coral;
    }
    .modern-toast.info {
        background-color: blue;
    }
    .modern-toast.success i {
        color: var(--success-color);
    }

    .modern-toast.error i {
        color: var(--error-color);
    }

    .modern-toast.warning i {
        color: white;
    }

    .modern-toast.info i {
        color: white;
    }

.modern-toast-message {
    font-size: 14px;
    color: white;
    flex-grow: 1;
    font-weight:700
}

.modern-toast-close {
    color: #b2bec3;
    cursor: pointer;
    font-size: 14px;
    margin-left: 15px;
}

    .modern-toast-close:hover {
        color: #636e72;
    }

/* Animations */
@keyframes modernFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modernSlideIn {
    0% {
        transform: translateY(-100px) scale(0.5);
        opacity: 0;
    }

    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes modernPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes modernProgress {
    0% {
        width: 100%;
    }

    100% {
        width: 0%;
    }
}

@keyframes modernToastIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .modern-modal-content {
        width: 95%;
        margin: 20% auto;
    }

    .modern-btn {
        padding: 10px 25px;
        font-size: 14px;
    }
}
