/* ===================================
   MENSAJES ELEGANTES - MR CONSTRUCTOR
   =================================== */

/* Container de mensajes flotantes */
.messages-elegant-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    max-width: 450px;
    width: 100%;
}

/* Mensaje individual */
.message-elegant {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 20px 24px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    animation: slideInRight 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
    border-left: 5px solid #6B4423;
}

/* Animación de entrada */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Animación de salida */
@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(100%) scale(0.8);
    }
}

.message-elegant.closing {
    animation: slideOutRight 0.4s ease-in-out forwards;
}

/* Icono del mensaje */
.message-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 24px;
    background: linear-gradient(135deg, #6B4423 0%, #8B5A3C 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(107, 68, 35, 0.3);
}

/* Contenido del mensaje */
.message-content {
    flex: 1;
    min-width: 0;
}

.message-title {
    font-weight: 700;
    font-size: 16px;
    color: #2c2c2c;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.message-text {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

/* Botón de cerrar */
.message-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 18px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    padding: 0;
}

.message-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
    transform: rotate(90deg);
}

/* Barra de progreso */
.message-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #6B4423 0%, #d4af37 100%);
    border-radius: 0 0 0 16px;
    animation: progressBar 5s linear forwards;
}

@keyframes progressBar {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Variantes de colores para diferentes tipos */
.message-elegant.success {
    border-left-color: #28a745;
}

.message-elegant.success .message-icon {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.message-elegant.error {
    border-left-color: #dc3545;
}

.message-elegant.error .message-icon {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.message-elegant.warning {
    border-left-color: #ffc107;
}

.message-elegant.warning .message-icon {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.message-elegant.info {
    border-left-color: #17a2b8;
}

.message-elegant.info .message-icon {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.3);
}

/* Estilos específicos para login/logout */
.message-elegant.login_success .message-icon {
    background: linear-gradient(135deg, #6B4423 0%, #d4af37 100%);
    animation: pulse 1s ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.message-elegant.logout_success .message-icon {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
}

/* Responsive */
@media (max-width: 768px) {
    .messages-elegant-container {
        top: 70px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .message-elegant {
        padding: 16px 20px;
    }
    
    .message-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .message-title {
        font-size: 15px;
    }
    
    .message-text {
        font-size: 13px;
    }
}