/* Mejoras para el chatbot Renato - Estilos adicionales */

/* Header con botones de control */
.header-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

#restart-chat, #minimize-chat {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: white;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#restart-chat:hover, #minimize-chat:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

#restart-chat:active, #minimize-chat:active {
    transform: scale(0.95);
}

/* Indicador de procesamiento */
.message.processing .text {
    color: #666;
    font-style: italic;
}

.processing-dots {
    animation: processingPulse 2s infinite;
}

@keyframes processingPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Mensaje de sistema */
.message.system {
    background: rgba(52, 152, 219, 0.1);
    border-left: 4px solid #3498db;
    margin: 10px 0;
    padding: 10px;
    border-radius: 8px;
}

.message.system .text {
    color: #2c3e50;
    font-size: 14px;
}

/* Avisos temporales */
.message.aviso {
    background: rgba(241, 196, 15, 0.1);
    border-left: 4px solid #f1c40f;
    animation: slideInFromTop 0.3s ease-out;
}

.message.aviso .text {
    color: #b7950b;
    font-weight: 500;
}

@keyframes slideInFromTop {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Error técnico */
.message.technical-error {
    background: rgba(231, 76, 60, 0.1);
    border-left: 4px solid #e74c3c;
    animation: shake 0.5s ease-in-out;
}

.message.technical-error .text {
    color: #c0392b;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Botones deshabilitados */
.option-btn:disabled,
.appointment-btn:disabled,
#send-text:disabled,
#upload-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #bdc3c7;
    color: #7f8c8d;
}

.option-btn:disabled:hover,
.appointment-btn:disabled:hover {
    background: #bdc3c7;
    transform: none;
}

/* Input deshabilitado */
#text-input:disabled {
    background: #ecf0f1;
    color: #7f8c8d;
    cursor: not-allowed;
}

/* Mejoras visuales para botones activos */
.option-btn:not(:disabled):hover,
.appointment-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.option-btn:not(:disabled):active,
.appointment-btn:not(:disabled):active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Indicador de estado en el header */
.header-content.processing {
    position: relative;
}

.header-content.processing::after {
    content: "●";
    position: absolute;
    top: 8px;
    right: -10px;
    color: #f39c12;
    font-size: 12px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .header-buttons {
        gap: 4px;
    }
    
    #restart-chat, #minimize-chat {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .message.system,
    .message.aviso,
    .message.technical-error {
        margin: 8px 0;
        padding: 8px;
        font-size: 13px;
    }
}

/* Tooltips para botones */
#restart-chat[title]:hover::after,
#minimize-chat[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}
