/* chatbot.css */
#alcaldia-bot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

#abot-btn {
    width: 62px;
    height: 62px;
    background: linear-gradient(135deg, #1B5E20, #43A047);
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(27, 94, 32, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
    outline: none;
    font-size: 28px;
}

#abot-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(27, 94, 32, 0.5);
}

#abot-panel {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 355px;
    height: 530px;
    background: white;
    border-radius: 18px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.9) translateY(20px);
}

#abot-panel.abot-open {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1) translateY(0);
}

.abot-header {
    background: linear-gradient(135deg, #1B5E20, #43A047);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.abot-header-titles h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.abot-header-titles p {
    margin: 2px 0 0 0;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
}

.abot-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.2s;
}

.abot-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.abot-chat-area {
    flex: 1;
    background: #F1F8E9;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Scrollbar para webkit */
.abot-chat-area::-webkit-scrollbar { width: 6px; }
.abot-chat-area::-webkit-scrollbar-track { background: transparent; }
.abot-chat-area::-webkit-scrollbar-thumb { background: #C8E6C9; border-radius: 3px; }

.abot-msg {
    max-width: 85%;
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    animation: abot-fade-in 0.3s ease;
}

@keyframes abot-fade-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.abot-msg.bot {
    align-self: flex-start;
    background: white;
    color: #333;
    border-left: 3px solid #43A047;
    border-radius: 0 12px 12px 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.abot-msg.bot ul, .abot-msg.bot ol {
    margin: 8px 0;
    padding-left: 20px;
}

.abot-msg.bot strong {
    color: #1B5E20;
    font-weight: 600;
}

.abot-msg.user {
    align-self: flex-end;
    background: #1B5E20;
    color: white;
    border-radius: 12px 0 12px 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.abot-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 5px;
}

.abot-chip {
    background: white;
    border: 1px solid #A5D6A7;
    color: #2E7D32;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 500;
}

.abot-chip:hover {
    background: #E8F5E9;
}

.abot-input-area {
    padding: 12px;
    background: white;
    border-top: 1px solid #E0E0E0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.abot-input-area input {
    flex: 1;
    border: 1.5px solid #C8E6C9;
    border-radius: 24px;
    padding: 10px 15px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.abot-input-area input:focus {
    border-color: #43A047;
}

.abot-input-area button {
    background: #1B5E20;
    color: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.abot-input-area button:hover {
    background: #144917;
}

.abot-input-area button:disabled {
    background: #A5D6A7;
    cursor: not-allowed;
}

.abot-footer {
    text-align: center;
    font-size: 10px;
    color: #9E9E9E;
    padding: 6px;
    background: #FAFAFA;
}

/* Typing Indicator */
.abot-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    align-self: flex-start;
    background: white;
    border-radius: 0 12px 12px 12px;
}

.abot-typing span {
    width: 6px;
    height: 6px;
    background: #81C784;
    border-radius: 50%;
    animation: abot-bounce 1.4s infinite ease-in-out both;
}

.abot-typing span:nth-child(1) { animation-delay: -0.32s; }
.abot-typing span:nth-child(2) { animation-delay: -0.16s; }

@keyframes abot-bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

@media (max-width: 480px) {
    #abot-panel {
        width: calc(100vw - 40px);
        height: 80vh;
        max-height: 600px;
    }
}
