/* chat.css */
.chat-abogados-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.chat-abogados-toggle {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px;
    min-height: 60px;
    max-width: 60px;
    max-height: 60px;
    padding: 0 !important;
    margin: 0 !important;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    background-color: #DFAE3E !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
    line-height: 1;
}

.chat-abogados-toggle svg {
    display: block;
    stroke: #ffffff;
    color: #ffffff;
}

.chat-abogados-toggle:hover,
.chat-abogados-toggle:focus,
.chat-abogados-toggle:active {
    transform: scale(1.05);
    background-color: #DFAE3E !important;
    outline: none !important;
}

.chat-abogados-toggle svg {
    width: 30px !important;
    height: 30px !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    fill: #ffffff !important;
}

.chat-abogados-toggle svg path {
    fill: #ffffff !important;
}

.chat-abogados-window {
    display: none;
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 85vw;
    max-width: 360px;
    height: 550px;
    max-height: calc(100vh - 120px);
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    flex-direction: column;
}

.chat-abogados-window.open {
    display: flex;
}

.chat-abogados-header {
    background-color: #000000;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.chat-abogados-title {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
}

.chat-abogados-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.chat-abogados-messages {
    padding: 15px;
    flex: 1;
    overflow-y: auto;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-message {
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 85%;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.chat-message.bot-message {
    background-color: #e9ecef;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.chat-message.user-message {
    background-color: #000000;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.chat-message a {
    color: #0056b3;
    text-decoration: underline;
}

.chat-abogados-options {
    padding: 15px;
    background-color: white;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 160px;
    overflow-y: auto;
    flex-shrink: 0;
}

.chat-option-btn {
    background-color: white;
    border: 1px solid #000000;
    color: #000000;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 11px;
    line-height: 1.3;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
    font-weight: 500;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.chat-option-btn:hover,
.chat-option-btn:focus,
.chat-option-btn:active {
    background-color: #000000;
    border-color: #000000;
    color: white;
}

.chat-abogados-footer {
    padding: 15px;
    background-color: white;
    border-top: 1px solid #eee;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* WhatsApp Button */
.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #25D366;
    color: #ffffff !important;
    padding: 10px 15px;
    border-radius: 20px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.2s;
    text-align: center;
}

.whatsapp-btn:hover {
    background-color: #128C7E;
    color: #ffffff !important;
}

.whatsapp-btn svg {
    width: 20px;
    height: 20px;
}

/* Email Button */
.email-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #1a73e8;
    color: #ffffff !important;
    padding: 10px 15px;
    border-radius: 20px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.2s;
    text-align: center;
}

.email-btn:hover {
    background-color: #0f5bbd;
    color: #ffffff !important;
}

.email-btn svg {
    width: 20px;
    height: 20px;
}

/* Typing indicator */
.typing-indicator {
    padding: 10px 15px;
    background-color: #e9ecef;
    border-radius: 15px;
    border-bottom-left-radius: 5px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: auto;
    align-self: flex-start;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: #888;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

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

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