/* ============================================
   MODERN DELETE CONFIRMATION MODAL
   ============================================ */

.delete-confirm-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
}

.delete-confirm-overlay.active {
    opacity: 1;
    visibility: visible;
}

.delete-confirm-modal {
    background: linear-gradient(135deg, rgba(30, 30, 45, 0.95) 0%, rgba(20, 20, 35, 0.98) 100%);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 28px;
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    transform: scale(0.8) translateY(50px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 30px 60px -15px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 0 100px rgba(239, 68, 68, 0.2);
}

.delete-confirm-overlay.active .delete-confirm-modal {
    transform: scale(1) translateY(0);
}

/* Warning Animation Header */
.delete-confirm-header {
    padding: 35px 30px 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.delete-confirm-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ef4444, #f97316, #ef4444);
    background-size: 200% 100%;
    animation: warningPulse 2s linear infinite;
}

@keyframes warningPulse {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* Animated Warning Icon */
.delete-warning-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 20px;
    position: relative;
}

.delete-warning-icon-inner {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(249, 115, 22, 0.2) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #ef4444;
    border: 2px solid rgba(239, 68, 68, 0.3);
    animation: warningIconPulse 2s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

@keyframes warningIconPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 30px 10px rgba(239, 68, 68, 0.2);
    }
}

/* Ripple Effect */
.delete-warning-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(239, 68, 68, 0.3);
    animation: rippleEffect 2s ease-out infinite;
}

.delete-warning-ripple:nth-child(2) {
    animation-delay: 0.5s;
}

.delete-warning-ripple:nth-child(3) {
    animation-delay: 1s;
}

@keyframes rippleEffect {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Header Text */
.delete-confirm-title {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 10px;
}

.delete-confirm-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

/* User/Item Info Display */
.delete-target-info {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 16px;
    padding: 16px 20px;
    margin: 0 30px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.delete-target-icon {
    width: 45px;
    height: 45px;
    background: rgba(239, 68, 68, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #ef4444;
    flex-shrink: 0;
}

.delete-target-details {
    flex: 1;
    min-width: 0;
}

.delete-target-name {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.delete-target-type {
    font-size: 12px;
    color: #ef4444;
    font-weight: 600;
}

/* Warning Message */
.delete-warning-message {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 12px;
    padding: 14px 18px;
    margin: 0 30px 25px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.delete-warning-message i {
    color: #f59e0b;
    font-size: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.delete-warning-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.delete-warning-text strong {
    color: #f59e0b;
}

/* Action Buttons */
.delete-confirm-actions {
    padding: 0 30px 30px;
    display: flex;
    gap: 12px;
}

.delete-btn-cancel {
    flex: 1;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.delete-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.delete-btn-confirm {
    flex: 1;
    padding: 14px 20px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    border-radius: 14px;
    color: white;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
    position: relative;
    overflow: hidden;
}

.delete-btn-confirm::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.delete-btn-confirm:hover::before {
    left: 100%;
}

.delete-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.5);
}

.delete-btn-confirm:active {
    transform: translateY(0);
}

/* Loading State */
.delete-btn-confirm.loading {
    pointer-events: none;
    opacity: 0.8;
}

.delete-btn-confirm.loading::after {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Shake Animation for Warning */
@keyframes shakeWarning {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.delete-confirm-modal.shake {
    animation: shakeWarning 0.5s ease;
}

/* Light Theme */
[data-theme="light"] .delete-confirm-modal {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 250, 250, 0.99) 100%);
    border-color: rgba(239, 68, 68, 0.25);
    box-shadow: 
        0 30px 60px -15px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset,
        0 0 80px rgba(239, 68, 68, 0.15);
}

[data-theme="light"] .delete-target-info {
    background: rgba(239, 68, 68, 0.05);
}

[data-theme="light"] .delete-btn-cancel {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: #2d3748;
}

[data-theme="light"] .delete-btn-cancel:hover {
    background: rgba(0, 0, 0, 0.08);
}

/* RTL Support */
body[dir="rtl"] .delete-warning-message i {
    margin-top: 2px;
}

body[dir="rtl"] .delete-target-info {
    flex-direction: row-reverse;
}

body[dir="rtl"] .delete-confirm-actions {
    flex-direction: row-reverse;
}

/* Responsive */
@media (max-width: 480px) {
    .delete-confirm-modal {
        max-width: 100%;
        margin: 10px;
    }
    
    .delete-confirm-header {
        padding: 25px 20px 20px;
    }
    
    .delete-warning-icon {
        width: 70px;
        height: 70px;
    }
    
    .delete-warning-icon-inner {
        font-size: 30px;
    }
    
    .delete-confirm-title {
        font-size: 20px;
    }
    
    .delete-target-info,
    .delete-warning-message {
        margin: 0 20px 20px;
        padding: 14px 16px;
    }
    
    .delete-confirm-actions {
        padding: 0 20px 20px;
        flex-direction: column;
    }
    
    .delete-btn-cancel,
    .delete-btn-confirm {
        width: 100%;
    }
}
