.dawood-ai-chatbot {
    border: 1px solid #c6d0d6;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 36px rgba(7, 54, 68, 0.18);
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", sans-serif;
    overflow: hidden;
}

.dawood-ai-chatbot--inline {
    max-width: 520px;
    padding: 0;
}

.dawood-ai-chatbot__messages {
    min-height: 240px;
    max-height: 360px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 16px 8px;
    background: linear-gradient(180deg, #f7fafb 0%, #ffffff 100%);
}

.dawood-ai-chatbot__message {
    padding: 10px 14px;
    border-radius: 16px;
    line-height: 1.4;
    font-size: 14px;
    max-width: 80%;
}

.dawood-ai-chatbot__message--user {
    background: #073644;
    color: #ffffff;
    align-self: flex-end;
    box-shadow: 0 8px 16px rgba(7, 54, 68, 0.2);
}

.dawood-ai-chatbot__message--bot {
    background: #e9eff1;
    align-self: flex-start;
}

.dawood-ai-chatbot__input {
    display: flex;
    gap: 8px;
    padding: 12px 14px 16px;
    background: #ffffff;
}

.dawood-ai-chatbot__field {
    flex: 1;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #c6d0d6;
    font-size: 14px;
    background: #f7fafb;
    color: #073644;
}

.dawood-ai-chatbot__send {
    padding: 8px 10px;
    border: none;
    border-radius: 50%;
    background: #0a4a5d;
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dawood-ai-chatbot__send:hover {
    background: #0b566d;
}

.dawood-ai-chatbot__send-icon {
    display: block;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 7px solid #ffffff;
    margin-left: 2px;
}

.dawood-ai-chatbot--widget {
    position: fixed;
    width: 300px;
    border-radius: 16px;
    z-index: 9999;
    padding: 0;
    overflow: hidden;
    background: #ffffff;
}

.dawood-ai-chatbot--preview {
    position: relative;
    right: auto;
    left: auto;
    bottom: auto;
    margin-top: 16px;
    max-width: 360px;
}

.dawood-ai-chatbot--preview,
.dawood-ai-chatbot--preview * {
    box-sizing: border-box;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.dawood-ai-chatbot--preview .dawood-ai-chatbot__toggle,
.dawood-ai-chatbot--preview .dawood-ai-chatbot__send {
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    line-height: 1.2;
}

.dawood-ai-chatbot--preview .dawood-ai-chatbot__toggle {
    width: 100%;
    background: #1f4b99;
    color: #ffffff;
    font-size: 15px;
}

.dawood-ai-chatbot--preview .dawood-ai-chatbot__send {
    background: #1f4b99;
    color: #ffffff;
    font-size: 14px;
}

.dawood-ai-chatbot--preview .dawood-ai-chatbot__send:hover,
.dawood-ai-chatbot--preview .dawood-ai-chatbot__toggle:hover {
    background: #183c7a;
}

.dawood-ai-chatbot--preview .dawood-ai-chatbot__field {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
}

.dawood-ai-chatbot--position-bottom-right {
    right: 24px;
    bottom: 24px;
}

.dawood-ai-chatbot--position-bottom-left {
    left: 24px;
    bottom: 24px;
}

.dawood-ai-chatbot__toggle {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -44px;
    margin: 0 auto;
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #0b566d, #073644);
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 10px 18px rgba(7, 54, 68, 0.3);
}

.dawood-ai-chatbot__panel {
    display: none;
    padding: 0;
    gap: 12px;
    flex-direction: column;
}

.dawood-ai-chatbot.is-open .dawood-ai-chatbot__panel {
    display: flex;
}

.dawood-ai-chatbot.is-open .dawood-ai-chatbot__toggle {
    top: 6px;
    right: 8px;
    left: auto;
    bottom: auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #0a4a5d;
    font-size: 16px;
    box-shadow: none;
}

.dawood-ai-chatbot--widget:not(.is-open) .dawood-ai-chatbot__toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    left: auto;
}

.dawood-ai-chatbot--position-bottom-left:not(.is-open) .dawood-ai-chatbot__toggle {
    right: auto;
    left: 24px;
}

@media (max-width: 600px) {
    .dawood-ai-chatbot--inline {
        max-width: 100%;
    }

    .dawood-ai-chatbot__input {
        flex-direction: column;
    }

    .dawood-ai-chatbot__send {
        width: 100%;
    }

    .dawood-ai-chatbot--widget {
        width: calc(100% - 32px);
        right: 16px;
        left: 16px;
    }
}

/* Force widget styling against aggressive theme overrides */
.dawood-ai-chatbot.dawood-ai-chatbot--widget,
.dawood-ai-chatbot.dawood-ai-chatbot--widget * {
    box-sizing: border-box !important;
    font-family: "Trebuchet MS", "Lucida Sans Unicode", "Lucida Grande", sans-serif !important;
}

.dawood-ai-chatbot.dawood-ai-chatbot--widget button,
.dawood-ai-chatbot.dawood-ai-chatbot--widget [type="button"] {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

.dawood-ai-chatbot.dawood-ai-chatbot--widget {
    background: #ffffff !important;
    border: 1px solid #c6d0d6 !important;
    border-radius: 16px !important;
    box-shadow: 0 18px 36px rgba(7, 54, 68, 0.18) !important;
}

.dawood-ai-chatbot.dawood-ai-chatbot--widget .dawood-ai-chatbot__header {
    background: linear-gradient(135deg, #073644 0%, #0a4a5d 100%) !important;
    color: #ffffff !important;
}

.dawood-ai-chatbot.dawood-ai-chatbot--widget .dawood-ai-chatbot__message--user {
    background: #073644 !important;
    color: #ffffff !important;
}

.dawood-ai-chatbot.dawood-ai-chatbot--widget .dawood-ai-chatbot__message--bot {
    background: #e9eff1 !important;
    color: #073644 !important;
}

.dawood-ai-chatbot.dawood-ai-chatbot--widget .dawood-ai-chatbot__field {
    background: #f7fafb !important;
    border: 1px solid #c6d0d6 !important;
    color: #073644 !important;
}

.dawood-ai-chatbot.dawood-ai-chatbot--widget .dawood-ai-chatbot__send {
    background: #0a4a5d !important;
    color: #ffffff !important;
    border-radius: 50% !important;
    padding: 8px 10px !important;
    width: 32px !important;
    height: 32px !important;
}

.dawood-ai-chatbot.dawood-ai-chatbot--widget .dawood-ai-chatbot__toggle {
    background: radial-gradient(circle at 30% 30%, #0b566d, #073644) !important;
    color: #ffffff !important;
    border-radius: 50% !important;
    box-shadow: 0 10px 18px rgba(7, 54, 68, 0.3) !important;
    width: 52px !important;
    height: 52px !important;
    padding: 0 !important;
}

.dawood-ai-chatbot__toggle-text {
    display: none;
}

.dawood-ai-chatbot.is-open .dawood-ai-chatbot__toggle-text {
    display: none;
}

.dawood-ai-chatbot.is-open .dawood-ai-chatbot__toggle-icon {
    font-size: 20px;
}

.dawood-ai-chatbot__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #073644 0%, #0a4a5d 100%);
    color: #ffffff;
}

.dawood-ai-chatbot__title {
    font-weight: 600;
    font-size: 14px;
}


.dawood-ai-chatbot--widget:not(.is-open) .dawood-ai-chatbot__panel,
.dawood-ai-chatbot--widget:not(.is-open) .dawood-ai-chatbot__header {
    display: none;
}

.dawood-ai-chatbot--widget:not(.is-open) {
    border: none;
    background: transparent;
    box-shadow: none;
    width: 52px;
    height: 52px;
    padding: 0;
    overflow: visible;
}
.dawood-ai-chatbot__toggle-icon {
    font-weight: 700;
    letter-spacing: 0.5px;
}

.dawood-ai-chatbot.is-open .dawood-ai-chatbot__toggle-icon {
    font-size: 18px;
}

.dawood-ai-chatbot--widget:not(.is-open) .dawood-ai-chatbot__toggle-icon {
    font-size: 14px;
}

.dawood-ai-chatbot__typing {
    display: inline-flex;
    gap: 4px;
    margin-left: 4px;
    vertical-align: middle;
}

.dawood-ai-chatbot__typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #94a3b8;
    animation: dawood-ai-chatbot-bounce 1s infinite ease-in-out;
}

.dawood-ai-chatbot__typing span:nth-child(2) {
    animation-delay: 0.15s;
}

.dawood-ai-chatbot__typing span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes dawood-ai-chatbot-bounce {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    40% {
        transform: translateY(-4px);
        opacity: 1;
    }
}
