/* Daitamo Chatbot Widget Styles */

* {
    box-sizing: border-box;
}

/* Botón flotante */
#daitamo-chat-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: #0a2540;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 9999;
}

#daitamo-chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Ventana del chat */
#daitamo-chat-window {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 380px;
    height: 600px;
    max-height: calc(100vh - 120px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9998;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
}

/* Header */
#daitamo-chat-header {
    background: #0a2540;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#daitamo-chat-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

#daitamo-chat-header p {
    margin: 4px 0 0 0;
    font-size: 13px;
    opacity: 0.9;
}

#daitamo-chat-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

#daitamo-chat-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Mensajes */
#daitamo-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #E8F0F6;
}

.daitamo-message {
    display: flex;
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bot-message {
    justify-content: flex-start;
}

.user-message {
    justify-content: flex-end;
}

.message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.bot-message .message-content {
    background: white;
    color: #2d3748;
    border-bottom-left-radius: 4px;
}

.user-message .message-content {
    background: #0a2540;
    color: white;
    border-bottom-right-radius: 4px;
}

/* Typing indicator */
.typing-indicator .message-content {
    display: flex;
    gap: 4px;
    padding: 16px;
}

.typing-indicator .message-content span {
    width: 8px;
    height: 8px;
    background: #cbd5e0;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite;
}

.typing-indicator .message-content span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator .message-content span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Meeting prompt buttons */
.meeting-prompt .message-content {
    max-width: 90%;
}

.meeting-prompt p {
    margin: 0 0 12px 0;
}

.prompt-buttons {
    display: flex;
    gap: 8px;
}

.prompt-button {
    flex: 1;
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.prompt-button.yes {
    background: #0a2540;
    color: white;
}

.prompt-button.yes:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(10, 37, 64, 0.2);
}

.prompt-button.no {
    background: #e2e8f0;
    color: #4a5568;
}

.prompt-button.no:hover {
    background: #cbd5e0;
}

/* Input container */
#daitamo-chat-input-container {
    padding: 16px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 8px;
}

#daitamo-chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

#daitamo-chat-input:focus {
    border-color: #78A5C3;
}

#daitamo-chat-send {
    width: 44px;
    height: 44px;
    background: #0a2540;
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

#daitamo-chat-send:hover {
    transform: scale(1.05);
}

#daitamo-chat-send:active {
    transform: scale(0.95);
}

/* Contact form */
#daitamo-contact-form {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: white;
}

.form-header {
    margin-bottom: 24px;
}

.form-header h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #2d3748;
}

.form-header p {
    margin: 0;
    font-size: 14px;
    color: #718096;
}

#daitamo-form input,
#daitamo-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

#daitamo-form input:focus,
#daitamo-form textarea:focus {
    border-color: #78A5C3;
}

#daitamo-form textarea {
    resize: vertical;
    min-height: 60px;
}

.form-buttons {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.form-buttons button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

#daitamo-form-cancel {
    background: #e2e8f0;
    color: #4a5568;
}

#daitamo-form-cancel:hover {
    background: #cbd5e0;
}

#daitamo-form-submit {
    background: #0a2540;
    color: white;
}

#daitamo-form-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(10, 37, 64, 0.2);
}

#daitamo-form-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Mobile responsive */
@media (max-width: 480px) {
    #daitamo-chat-window {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    #daitamo-chat-button {
        bottom: 16px;
        right: 16px;
    }
}

/* Scrollbar styling */
#daitamo-chat-messages::-webkit-scrollbar,
#daitamo-contact-form::-webkit-scrollbar {
    width: 6px;
}

#daitamo-chat-messages::-webkit-scrollbar-track,
#daitamo-contact-form::-webkit-scrollbar-track {
    background: transparent;
}

#daitamo-chat-messages::-webkit-scrollbar-thumb,
#daitamo-contact-form::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

#daitamo-chat-messages::-webkit-scrollbar-thumb:hover,
#daitamo-contact-form::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}
