/* Chatbot Styles for La Mariscada del Muelle */
:root {
    --chat-primary: #f97316;
    /* Orange 500 */
    --chat-bg: #09090b;
    /* Zinc 950 */
    --chat-text: #fafafa;
    /* Zinc 50 */
    --chat-border: rgba(255, 255, 255, 0.1);
}

#mariscada-chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

#chat-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--chat-primary);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#chat-toggle-btn:hover {
    transform: scale(1.1);
}

#chat-toggle-btn iconify-icon {
    font-size: 28px;
}

#chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background-color: var(--chat-bg);
    border: 1px solid var(--chat-border);
    border-radius: 1.5rem;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#chat-window.active {
    display: flex;
}

.chat-header {
    padding: 1.25rem;
    background: linear-gradient(135deg, #18181b, #09090b);
    border-bottom: 1px solid var(--chat-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-avatar {
    width: 32px;
    height: 32px;
    background-color: var(--chat-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.chat-header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
}

.chat-status {
    font-size: 0.75rem;
    color: #22c55e;
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background-color: #22c55e;
    border-radius: 50%;
}

.chat-messages {
    flex: 1;
    padding: 1.25rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: var(--chat-primary) transparent;
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background-color: var(--chat-border);
    border-radius: 10px;
}

.message {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.message.bot {
    align-self: flex-start;
    background-color: #1a1a1e;
    color: var(--chat-text);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--chat-border);
}

.message.user {
    align-self: flex-end;
    background-color: var(--chat-primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.typing-indicator {
    align-self: flex-start;
    padding: 0.75rem;
    display: none;
    gap: 4px;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background-color: #71717a;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

.chat-input-area {
    padding: 1rem;
    border-top: 1px solid var(--chat-border);
    display: flex;
    gap: 0.5rem;
    background-color: #0c0c0e;
}

#chat-input {
    flex: 1;
    background: transparent;
    border: 1px solid var(--chat-border);
    border-radius: 0.75rem;
    padding: 0.6rem 0.8rem;
    color: white;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

#chat-input:focus {
    border-color: var(--chat-primary);
}

#send-btn {
    background-color: var(--chat-primary);
    color: white;
    border: none;
    border-radius: 0.75rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.2s;
}

#send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    #mariscada-chat-widget {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }

    #chat-window {
        width: calc(100vw - 2rem);
        height: calc(100vh - 120px);
        bottom: 70px;
    }
}