/* Modern Confirmation Modal System */
.modern-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-confirm-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modern-confirm-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 0;
    max-width: 480px;
    width: 90%;
    margin: 20px;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.modern-confirm-overlay.show .modern-confirm-modal {
    transform: scale(1) translateY(0);
}

.modern-confirm-header {
    padding: 24px 24px 16px 24px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
}

.modern-confirm-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    font-size: 20px;
    font-weight: bold;
}

.modern-confirm-icon.warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

.modern-confirm-icon.danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5b7b1 100%);
    color: #721c24;
}

.modern-confirm-icon.info {
    background: linear-gradient(135deg, #cce7ff 0%, #a3d5ff 100%);
    color: #004085;
}

.modern-confirm-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    line-height: 1.3;
}

.modern-confirm-body {
    padding: 16px 24px 24px 24px;
}

.modern-confirm-message {
    font-size: 15px;
    line-height: 1.5;
    color: #495057;
    margin-bottom: 24px;
    white-space: pre-wrap;
}

.modern-confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modern-confirm-btn {
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.modern-confirm-btn-cancel {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.modern-confirm-btn-cancel:hover {
    background: #e9ecef;
    color: #495057;
    transform: translateY(-1px);
}

.modern-confirm-btn-confirm {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
}

.modern-confirm-btn-confirm:hover {
    background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.modern-confirm-btn-confirm.danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.modern-confirm-btn-confirm.danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.modern-confirm-btn-confirm.warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #000;
}

.modern-confirm-btn-confirm.warning:hover {
    background: linear-gradient(135deg, #e0a800 0%, #d39e00 100%);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.modern-confirm-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.modern-confirm-btn-loading {
    pointer-events: none;
}

.modern-confirm-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .modern-confirm-modal {
        background: #2c3e50;
        color: #ecf0f1;
    }
    
    .modern-confirm-header {
        border-bottom-color: #34495e;
    }
    
    .modern-confirm-title {
        color: #ecf0f1;
    }
    
    .modern-confirm-message {
        color: #bdc3c7;
    }
    
    .modern-confirm-btn-cancel {
        background: #34495e;
        color: #bdc3c7;
        border-color: #495057;
    }
    
    .modern-confirm-btn-cancel:hover {
        background: #495057;
        color: #ecf0f1;
    }
}

/* Mobile responsiveness */
@media (max-width: 576px) {
    .modern-confirm-modal {
        width: 95%;
        margin: 10px;
    }
    
    .modern-confirm-header {
        padding: 20px 20px 12px 20px;
    }
    
    .modern-confirm-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
        margin-right: 12px;
    }
    
    .modern-confirm-title {
        font-size: 18px;
    }
    
    .modern-confirm-body {
        padding: 12px 20px 20px 20px;
    }
    
    .modern-confirm-actions {
        flex-direction: column-reverse;
    }
    
    .modern-confirm-btn {
        width: 100%;
        justify-content: center;
    }
}