#chatbot-widget-root.chatbot-widget {
    position: fixed;
    right: 1rem;
    bottom: 0.5rem;
    z-index: 1055;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

#chatbot-admin-launcher-root.chatbot-admin-launcher {
    position: fixed;
    right: 1rem;
    bottom: 0.5rem;
    z-index: 1060;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

.chatbot-admin-launcher__button {
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.9rem;
    box-shadow: 0 0.75rem 1.5rem rgba(33, 37, 41, 0.28);
}

.chatbot-admin-launcher__button .chatbot-admin-launcher__label {
    display: none;
}

.chatbot-admin-launcher__button--has-unread {
    box-shadow: 0 0.75rem 1.5rem rgba(220, 53, 69, 0.35);
}

.chatbot-admin-launcher__button--attention {
    animation: chatbot-admin-launcher-attention 0.9s ease-in-out infinite;
    transform-origin: center;
}

.chatbot-admin-launcher__button--attention .chatbot-admin-launcher__badge {
    animation: chatbot-admin-launcher-badge-pulse 0.9s ease-in-out infinite;
}

@keyframes chatbot-admin-launcher-attention {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.06);
    }
}

@keyframes chatbot-admin-launcher-badge-pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.18);
    }
}

.chatbot-admin-launcher__icon {
    font-size: 1.1rem;
}

.chatbot-admin-launcher__badge {
    min-width: 1.5rem;
}

.chatbot-admin-launcher__panel {
    width: min(390px, calc(100vw - 2rem));
    height: min(560px, calc(100vh - 6rem));
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.chatbot-admin-launcher__header {
    background: linear-gradient(135deg, #212529 0%, #343a40 100%);
    color: #fff;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.chatbot-admin-launcher__title {
    font-weight: 700;
    line-height: 1.1;
}

.chatbot-admin-launcher__subtitle {
    font-size: 0.8rem;
    opacity: 0.85;
}

.chatbot-admin-launcher__summary {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.chatbot-admin-launcher__status-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #adb5bd;
    display: inline-block;
}

.chatbot-admin-launcher__status-dot--connected {
    background: #198754;
}

.chatbot-admin-launcher__status-dot--pending {
    background: #ffc107;
}

.chatbot-admin-launcher__list {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: #f8f9fa;
}

.chatbot-admin-launcher__item {
    display: block;
    width: 100%;
    text-align: left;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.9rem;
    background: #fff;
    padding: 0.8rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.chatbot-admin-launcher__item:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
}

.chatbot-admin-launcher__item-main {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.chatbot-admin-launcher__item-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chatbot-admin-launcher__item-sub {
    color: #6c757d;
    font-size: 0.85rem;
}

.chatbot-admin-launcher__item-preview {
    color: #212529;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chatbot-admin-launcher__empty {
    padding: 1.5rem;
    text-align: center;
}

.chatbot-admin-launcher__footer {
    padding: 0.85rem 1rem 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
}

.chatbot-admin-thread__messages {
    max-height: 58vh;
    overflow-y: auto;
    padding: 0.5rem 0.25rem;
    background: #f8f9fa;
    border-radius: 0.75rem;
}

.chatbot-admin-thread__subtitle {
    display: block;
}

@media (max-width: 576px) {
    #chatbot-admin-launcher-root.chatbot-admin-launcher {
        right: 0.75rem;
        bottom: 0.75rem;
    }

    .chatbot-admin-launcher__panel {
        width: calc(100vw - 1.5rem);
        height: min(72vh, 560px);
    }
}

.chatbot-widget__toggle {
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    box-shadow: 0 0.75rem 1.5rem rgba(13, 110, 253, 0.25);
}

.chatbot-widget__toggle-icon {
    font-size: 1rem;
}

#tipos-cambio-rapidos {
    min-height: 1.5rem;
    white-space: nowrap;
    flex-shrink: 0;
}

#tipos-cambio-rapidos .badge {
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
}

.chatbot-widget__panel {
    width: min(380px, calc(100vw - 2rem));
    height: min(560px, calc(100vh - 6rem));
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.chatbot-widget__header {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    color: #fff;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 0.75rem;
}

.chatbot-widget__title {
    font-weight: 700;
    line-height: 1.1;
}

.chatbot-widget__subtitle {
    font-size: 0.8rem;
    opacity: 0.85;
}

.chatbot-widget__status {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.chatbot-widget__status-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #adb5bd;
    display: inline-block;
}

.chatbot-widget__status-dot--connected {
    background: #198754;
}

.chatbot-widget__status-dot--pending {
    background: #ffc107;
}

.chatbot-widget__messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: #f8f9fa;
}

.chatbot-widget__message {
    max-width: 85%;
    padding: 0.65rem 0.8rem;
    border-radius: 1rem;
    word-wrap: break-word;
    white-space: pre-wrap;
    font-size: 0.95rem;
}

.chatbot-widget__message--user {
    align-self: flex-end;
    background: #0d6efd;
    color: #fff;
    border-bottom-right-radius: 0.25rem;
}

.chatbot-widget__message--bot {
    align-self: flex-start;
    background: #fff;
    color: #212529;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom-left-radius: 0.25rem;
}

.chatbot-widget__message--system,
.chatbot-widget__message--error {
    align-self: center;
    background: #fff3cd;
    color: #664d03;
    border: 1px solid #ffe69c;
}

.chatbot-widget__attachment {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
    color: inherit;
}

.chatbot-widget__typing {
    padding: 0.25rem 1rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.chatbot-widget__typing-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: #6c757d;
    animation: chatbot-widget-bounce 1.1s infinite ease-in-out;
}

.chatbot-widget__typing-dot:nth-child(2) {
    animation-delay: 0.15s;
}

.chatbot-widget__typing-dot:nth-child(3) {
    animation-delay: 0.3s;
}

.chatbot-widget__form {
    padding: 0.85rem 1rem 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
}

.chatbot-widget__send {
    min-width: 3rem;
}

@keyframes chatbot-widget-bounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 576px) {
    #chatbot-widget-root.chatbot-widget {
        right: 0.75rem;
        bottom: 0.5rem;
    }

    #chatbot-admin-launcher-root.chatbot-admin-launcher {
        right: 0.75rem;
        bottom: 0.5rem;
    }

    #tipos-cambio-rapidos {
        gap: 0.25rem !important;
        overflow-x: auto;
        max-width: 100%;
    }

    #tipos-cambio-rapidos .badge {
        padding: 0.25rem 0.4rem;
        font-size: 0.7rem;
    }

    .chatbot-widget__panel {
        width: calc(100vw - 1.5rem);
        height: min(70vh, 560px);
    }
}
