/* Modern Confirmation Modal System */
.confirmation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(4px);
}

.confirmation-overlay.show {
    opacity: 1;
    visibility: visible;
}

.confirmation-modal {
    background: white;
    border-radius: 16px;
    padding: 0;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    position: relative;
}

.confirmation-overlay.show .confirmation-modal {
    transform: scale(1) translateY(0);
}

.confirmation-header {
    padding: 2rem 2rem 1rem 2rem;
    text-align: center;
    position: relative;
}

.confirmation-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin: 0 auto 1rem auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    position: relative;
    overflow: hidden;
}

.confirmation-icon.warning {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    animation: iconPulse 2s infinite ease-in-out;
}

.confirmation-icon.success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.confirmation-icon.info {
    background: linear-gradient(135deg, #17a2b8, #20c997);
    color: white;
}

.confirmation-title {
    font-size: 1.375rem;
    font-weight: 600;
    color: #2d3436;
    margin: 0 0 0.5rem 0;
}

.confirmation-subtitle {
    font-size: 0.9375rem;
    color: #6c757d;
    margin: 0;
    line-height: 1.4;
}

.confirmation-body {
    padding: 0 2rem 1.5rem 2rem;
    text-align: center;
}

.confirmation-product {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.confirmation-product-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    background: #e9ecef;
}

.confirmation-product-details {
    flex: 1;
    text-align: left;
}

.confirmation-product-name {
    font-weight: 600;
    color: #2d3436;
    font-size: 0.9375rem;
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
}

.confirmation-product-price {
    color: #6c757d;
    font-size: 0.875rem;
    margin: 0;
}

.confirmation-actions {
    padding: 1.5rem 2rem 2rem 2rem;
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.confirmation-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    border: none;
    font-weight: 500;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
    position: relative;
    overflow: hidden;
}

.confirmation-btn:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transition: width 0.3s, height 0.3s;
    transform: translate(-50%, -50%);
}

.confirmation-btn:hover:before {
    width: 300px;
    height: 300px;
}

.confirmation-btn.cancel {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.confirmation-btn.cancel:hover {
    background: #e9ecef;
    color: #495057;
    transform: translateY(-1px);
}

.confirmation-btn.confirm {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.confirmation-btn.confirm:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.confirmation-btn.success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.confirmation-btn.success:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.confirmation-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.confirmation-btn.loading {
    pointer-events: none;
}

.confirmation-btn.loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Animations */
@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(255, 107, 107, 0);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 576px) {
    .confirmation-modal {
        margin: 1rem;
        max-width: none;
        width: calc(100% - 2rem);
    }
    
    .confirmation-header,
    .confirmation-body,
    .confirmation-actions {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .confirmation-actions {
        flex-direction: column;
    }
    
    .confirmation-btn {
        width: 100%;
        min-width: auto;
    }
    
    .confirmation-product {
        flex-direction: column;
        text-align: center;
    }
    
    .confirmation-product-details {
        text-align: center;
    }
}

/* Animation for removal confirmation specifically */
.remove-confirmation .confirmation-icon {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    animation: removeIconPulse 2s infinite ease-in-out;
}

@keyframes removeIconPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 20px rgba(255, 107, 107, 0);
    }
}

/* Clear cart confirmation */
.clear-confirmation .confirmation-icon {
    background: linear-gradient(135deg, #ffc107, #ffca2c);
    color: #856404;
    animation: clearIconPulse 2s infinite ease-in-out;
}

@keyframes clearIconPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.4);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 20px rgba(255, 193, 7, 0);
    }
}
