/* ===== Danae AI ChatBot widget ===== */

.back-to-top {
    bottom: 92px !important;
}

/* admin shortcut — only rendered when the page is in edit mode */
.chatbot-admin-btn {
    position: fixed;
    bottom: 30px;
    right: 224px;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #5a3652;
    color: #fff;
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.chatbot-admin-btn:hover {
    background: #4a2c44;
    color: #fff;
}


.chatbot-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #d9bd72;
    color: #0e1d31;
    border: none;
    border-radius: 999px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--heading-font, inherit);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chatbot-bubble:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
    color: #0e1d31;
}

.chatbot-bubble i {
    font-size: 18px;
    line-height: 1;
}

.chatbot-panel {
    position: fixed;
    bottom: 92px;
    right: 24px;
    z-index: 99998;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 560px;
    max-height: calc(100vh - 140px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-head {
    background: #5a3652;
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.chatbot-head-title {
    font-weight: 600;
    font-size: 15px;
}

.chatbot-head-title i {
    margin-right: 6px;
}

.chatbot-head-actions {
    display: flex;
    gap: 4px;
}

.chatbot-icon-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

.chatbot-icon-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.chatbot-msgs {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    background: #f8f5f7;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
}

.chatbot-msg {
    display: flex;
}

.chatbot-msg.user {
    justify-content: flex-end;
}

.chatbot-bubble-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.55;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.chatbot-msg.assistant .chatbot-bubble-msg {
    background: #ffffff;
    border: 1px solid #eee4ea;
    color: #333;
}

.chatbot-msg.user .chatbot-bubble-msg {
    background: #5a3652;
    color: #fff;
}

.chatbot-bubble-msg a {
    color: #29646c;
    font-weight: 600;
}

.chatbot-msg.user .chatbot-bubble-msg a {
    color: #d9bd72;
}

.chatbot-sources {
    margin-top: 6px;
    font-size: 11px;
    color: #999;
}

.chatbot-typing {
    display: flex;
    gap: 4px;
    align-items: center;
}

.chatbot-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #a37296;
    display: inline-block;
    animation: chatbotBlink 1.2s infinite ease-in-out;
}

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

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

@keyframes chatbotBlink {
    0%, 80%, 100% { opacity: 0.25; }
    40% { opacity: 1; }
}

.chatbot-quick {
    display: flex;
    gap: 8px;
    padding: 10px 14px 0;
    background: #fff;
    flex-wrap: wrap;
}

.chatbot-quick button,
.chatbot-quick a {
    font-size: 12px;
    border: 1px solid #d9bd72;
    background: #fff;
    color: #5a3652;
    border-radius: 999px;
    padding: 4px 12px;
    text-decoration: none;
    cursor: pointer;
}

.chatbot-quick button:hover,
.chatbot-quick a:hover {
    background: #fdf6e5;
}

.chatbot-input {
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid #eee4ea;
    padding: 10px 14px;
    background: #fff;
    flex-shrink: 0;
}

.chatbot-input input {
    flex: 1;
    border: none;
    outline: none;
    padding: 8px 4px;
    font-size: 14px;
    background: transparent;
}

.chatbot-send {
    background: #d9bd72;
    border: none;
    color: #0e1d31;
    border-radius: 8px;
    padding: 7px 14px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

.chatbot-send:hover {
    background: #c9a95f;
}

.chatbot-send:disabled {
    opacity: 0.55;
    cursor: default;
}

/* available Calendly slots shown in the appointment form */
.chatbot-slots {
    margin-top: 8px;
}

.chatbot-slots-hint {
    font-size: 12px;
    color: #6b5566;
    margin-bottom: 6px;
}

.chatbot-slots-label {
    font-size: 11px;
    font-weight: 600;
    color: #a37296;
    margin: 6px 0 3px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.chatbot-slots-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.chatbot-slot {
    font-size: 11px;
    border: 1px solid #29646c;
    background: #fff;
    color: #29646c;
    border-radius: 999px;
    padding: 3px 9px;
    cursor: pointer;
}

.chatbot-slot:hover {
    background: #29646c;
    color: #fff;
}

/* appointment form inside the chat */
.chatbot-appointment {
    border-top: 1px solid #eee4ea;
    padding: 12px 14px;
    background: #fff;
    flex-shrink: 0;
}

.chatbot-appointment-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 10px;
    color: #5a3652;
}

.chatbot-appointment .form-control {
    border: 1px solid #e3d9de;
    font-size: 13px;
}

.chatbot-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.chatbot-appointment-error {
    color: #b02a37;
    font-size: 12px;
    margin-top: 8px;
}

.chatbot-appointment-done {
    background: #f0f7f4;
    border: 1px solid #b7dfd2;
    color: #1d5c46;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 10px;
}

.chatbot-link-btn {
    background: none;
    border: none;
    color: #29646c;
    font-size: 13px;
    text-decoration: underline;
    padding: 0;
    cursor: pointer;
}

@media (max-width: 575px) {
    .chatbot-panel {
        right: 12px;
        bottom: 84px;
        height: calc(100vh - 120px);
    }

    .chatbot-bubble {
        bottom: 16px;
        right: 16px;
        padding: 10px 16px;
    }

    .chatbot-bubble-label {
        display: none;
    }

    .chatbot-admin-btn {
        right: auto;
        left: 16px;
        bottom: 22px;
    }
}
