/**
 * Client Alerts - Estilos para alertas bonitas y modernas (versión cliente)
 * Adaptado del sistema de alertas del admin
 */

.client-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 380px;
    max-width: 500px;
    padding: 1.5rem 2rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    z-index: 10000;
    animation: slideInCenter 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-origin: center center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.client-alert--success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
}

.client-alert--error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
}

.client-alert--error .client-alert__icon::after {
    background: rgba(220, 38, 38, 0.8);
}

.client-alert--error .client-alert__close {
    background: rgba(220, 38, 38, 0.8);
}

.client-alert--error .client-alert__close:hover {
    background: rgba(220, 38, 38, 1);
}

.client-alert--warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
}

.client-alert--warning .client-alert__icon::after {
    background: rgba(217, 119, 6, 0.8);
}

.client-alert--warning .client-alert__close {
    background: rgba(217, 119, 6, 0.8);
}

.client-alert--warning .client-alert__close:hover {
    background: rgba(217, 119, 6, 1);
}

.client-alert--info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
}

.client-alert--info .client-alert__icon::after {
    background: rgba(37, 99, 235, 0.8);
}

.client-alert--info .client-alert__close {
    background: rgba(37, 99, 235, 0.8);
}

.client-alert--info .client-alert__close:hover {
    background: rgba(37, 99, 235, 1);
}

.client-alert__icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 50%;
    font-size: 1.5rem;
}

.client-alert__icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    z-index: 0;
}

.client-alert__icon::after {
    content: '';
    position: absolute;
    width: 70%;
    height: 70%;
    background: rgba(5, 150, 105, 0.8);
    border-radius: 50%;
    z-index: 1;
}

.client-alert__icon i {
    position: relative;
    z-index: 2;
    color: #ffffff;
}

.client-alert__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.client-alert__title {
    font-size: 1.375rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.client-alert__message {
    font-size: 0.9375rem;
    opacity: 0.98;
    margin: 0;
    line-height: 1.4;
    font-weight: 400;
}

.client-alert__close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(5, 150, 105, 0.8);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.125rem;
    line-height: 1;
    padding: 0;
    position: relative;
    z-index: 1;
}

.client-alert__close:hover {
    background: rgba(5, 150, 105, 1);
    transform: scale(1.1);
}

.client-alert__close:active {
    transform: scale(0.95);
}

/* Animaciones */
@keyframes slideInCenter {
    from {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes slideOutCenter {
    from {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    to {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
}

.client-alert--closing {
    animation: slideOutCenter 0.3s ease-in forwards;
}

/* Modal de Confirmación */
.client-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
    animation: fadeIn 0.3s ease;
}

.client-confirm-modal__content {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    text-align: center;
}

.client-confirm-modal__icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #ffffff;
}

.client-confirm-modal__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.75rem 0;
    text-align: center;
}

.client-confirm-modal__message {
    font-size: 0.95rem;
    color: #666;
    margin: 0 0 2rem 0;
    text-align: center;
    line-height: 1.5;
}

.client-confirm-modal__actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.client-confirm-modal__btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 120px;
}

.client-confirm-modal__btn--cancel {
    background: #f3f4f6;
    color: #374151;
}

.client-confirm-modal__btn--cancel:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.client-confirm-modal__btn--confirm {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
}

.client-confirm-modal__btn--confirm:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .client-alert {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        min-width: calc(100% - 40px);
        max-width: calc(100% - 40px);
        padding: 1.25rem 1.5rem;
    }
    
    .client-alert__icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .client-alert__title {
        font-size: 1.25rem;
    }
    
    .client-alert__message {
        font-size: 0.875rem;
    }

    .client-confirm-modal__content {
        padding: 2rem 1.5rem;
    }

    .client-confirm-modal__actions {
        flex-direction: column;
    }

    .client-confirm-modal__btn {
        width: 100%;
    }
}

