/**
 * Confirmation Modal Component Styles
 * Reusable confirmation dialog with smooth animations
 * 
 * Usage:
 * 1. Include this CSS file in your page
 * 2. Use App\Helpers\HtmlBuilder::renderSiteConfirm() to render the modal HTML
 * 3. Include confirm-modal.js for functionality
 */

/* Base Modal Styles */
.confirmation-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    animation: modalFadeIn 0.3s ease-out;
}

.confirmation-modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Modal Overlay with Glassmorphism Effect */
.confirmation-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Modal Content Container */
.confirmation-content {
    position: relative;
    background: white;
    border-radius: 15px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
    transform-origin: center;
}

/* Modal Title */
.confirmation-content .confirmation-title,
.confirmation-content h5 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 600;
    text-align: center;
    font-size: 1.25rem;
}

/* Modal Message */
.confirmation-content .confirmation-message,
.confirmation-content p {
    color: #6c757d;
    margin-bottom: 1.5rem;
    text-align: center;
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Button Container */
.confirmation-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Confirm Button */
.btn-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.9rem;
    min-width: 100px;
}

.btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

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

/* Cancel Button */
.btn-cancel {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.9rem;
    min-width: 100px;
}

.btn-cancel:hover {
    background: #e9ecef;
    color: #495057;
    border-color: #dee2e6;
    transform: translateY(-1px);
}

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

/* Animation Keyframes */
@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Closing Animations */
.confirmation-modal.closing {
    animation: modalFadeOut 0.2s ease-in forwards;
}

.confirmation-modal.closing .confirmation-content {
    animation: modalSlideOut 0.2s ease-in forwards;
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes modalSlideOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.8) translateY(-30px);
    }
}

/* Responsive Design */
@media (max-width: 480px) {
    .confirmation-content {
        padding: 1.5rem;
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .confirmation-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-confirm,
    .btn-cancel {
        width: 100%;
        min-width: auto;
    }
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
    .confirmation-content {
        background: #2d3748;
        color: white;
    }
    
    .confirmation-content .confirmation-title,
    .confirmation-content h5 {
        color: #f7fafc;
    }
    
    .confirmation-content .confirmation-message,
    .confirmation-content p {
        color: #cbd5e0;
    }
    
    .btn-cancel {
        background: #4a5568;
        color: #e2e8f0;
        border-color: #2d3748;
    }
    
    .btn-cancel:hover {
        background: #2d3748;
        color: #f7fafc;
        border-color: #4a5568;
    }
}

/* Focus States for Accessibility */
.btn-confirm:focus,
.btn-cancel:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Loading State */
.btn-confirm.loading,
.btn-cancel.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}