/* =========================================================
   STRICT FORM & INPUT ISOLATION FOR CHATBOT
   Ensures website global form/input styles NEVER apply to chatbot
========================================================= */

.chatbot-widget-root,
.chatbot-widget-root *,
.chatbot-widget-root *::before,
.chatbot-widget-root *::after {
    box-sizing: border-box;
}

/* Hard reset for all form elements inside chatbot */
.chatbot-widget-root form,
.chatbot-widget-root fieldset,
.chatbot-widget-root input,
.chatbot-widget-root textarea,
.chatbot-widget-root select,
.chatbot-widget-root button,
.chatbot-widget-root label {
    box-sizing: border-box !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    letter-spacing: normal !important;
    text-shadow: none !important;
    text-transform: none !important;
    float: none !important;
    clear: none !important;
}

.chatbot-widget-root form {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.chatbot-widget-root input,
.chatbot-widget-root textarea,
.chatbot-widget-root select {
    border-radius: 0 !important;
    -webkit-border-radius: 0 !important;
    -moz-border-radius: 0 !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
}

/* Disable any website global bottom borders, heights, and floats */
.chatbot-widget-root input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
.chatbot-widget-root textarea,
.chatbot-widget-root select {
    float: none !important;
    height: auto;
    border: none !important;
    border-bottom: none !important;
    background: transparent !important;
    line-height: normal !important;
    color: #171717 !important;
    padding: 0;
    margin: 0 !important;
}

.chatbot-widget-root input:focus,
.chatbot-widget-root textarea:focus,
.chatbot-widget-root select:focus {
    border-color: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
}

.chatbot-widget-root button {
    border: 0;
    margin: 0;
    padding: 0;
    outline: none;
    /* background: transparent; */
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}

/* =========================================================
   CHATBOT WIDGET ROOT & VARIABLES
========================================================= */
.chatbot-widget-root {
    --chatbot-primary: #111111;
    --chatbot-shadow: rgba(0, 0, 0, 0.15);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* =========================================================
   CHATBOT LAUNCHER
========================================================= */

.chatbot-launcher {
    position: fixed;
    width: 62px;
    height: 62px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    background: linear-gradient(135deg, var(--chatbot-primary), color-mix(in srgb, var(--chatbot-primary) 70%, black));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99999;
    box-shadow:
        0 18px 45px var(--chatbot-shadow),
        0 5px 15px rgba(0, 0, 0, 0.1);
    transition:
        transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s ease,
        filter 0.3s ease;
}

@media (hover: hover) {
    .chatbot-launcher:hover {
        transform: translateY(-4px) scale(1.05);
        box-shadow:
            0 25px 60px var(--chatbot-shadow),
            0 8px 20px rgba(0, 0, 0, 0.12);
        filter: brightness(1.1);
    }
}

.chatbot-launcher:active {
    transform: scale(0.95);
}

.chatbot-launcher.is-open {
    background: var(--chatbot-primary);
}

.launcher-icon {
    position: relative;
    z-index: 2;
    font-size: 25px;
    line-height: 1;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.launcher-close {
    font-size: 30px;
    font-weight: 300;
    line-height: 1;
    pointer-events: none;
}

.launcher-glow {
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    filter: blur(8px);
    animation: launcherGlow 2.5s ease-in-out infinite;
    pointer-events: none;
}

/* =========================================================
   POSITIONING
========================================================= */

/* Bottom Right (Default) */
.position-bottom-right .chatbot-launcher {
    right: 24px;
    bottom: 24px;
}

.position-bottom-right .chatbot-window {
    right: 24px;
    bottom: 100px;
    transform-origin: bottom right;
}

/* Bottom Left */
.position-bottom-left .chatbot-launcher {
    left: 24px;
    bottom: 24px;
}

.position-bottom-left .chatbot-window {
    left: 24px;
    bottom: 100px;
    transform-origin: bottom left;
}

/* Top Right */
.position-top-right .chatbot-launcher {
    right: 24px;
    top: 24px;
}

.position-top-right .chatbot-window {
    right: 24px;
    top: 100px;
    transform-origin: top right;
}

/* Top Left */
.position-top-left .chatbot-launcher {
    left: 24px;
    top: 24px;
}

.position-top-left .chatbot-window {
    left: 24px;
    top: 100px;
    transform-origin: top left;
}

/* =========================================================
   CHAT WINDOW
========================================================= */

.chatbot-window {
    position: fixed;
    width: min(410px, calc(100vw - 48px));
    height: min(650px, calc(100dvh - 124px));
    min-height: 480px;
    display: flex;
    flex-direction: column;
    overflow: hidden;

    /* Premium Glassmorphism */
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);

    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    z-index: 99998;
    box-shadow:
        0 30px 90px rgba(0, 0, 0, 0.12),
        0 10px 30px rgba(0, 0, 0, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.4);

    animation: chatbotEnter 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* =========================================================
   HEADER
========================================================= */

.chatbot-header {
    position: relative;
    flex: 0 0 76px;
    min-height: 76px;
    padding: 0 16px 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;

    background: linear-gradient(135deg, var(--chatbot-primary), color-mix(in srgb, var(--chatbot-primary) 85%, black));
    color: #ffffff;
    box-sizing: border-box;
}

.chatbot-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-brand-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.chatbot-brand-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chatbot-brand-icon span {
    font-size: 18px;
    line-height: 1;
}

.chatbot-brand-info {
    display: flex;
    flex-direction: column;
}

.chatbot-name {
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chatbot-status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 11px;
}

.status-dot {
    width: 6px;
    height: 6px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #45d483;
    box-shadow: 0 0 0 3px rgba(69, 212, 131, 0.2);
}

.chatbot-close {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.2s ease;
}

@media (hover: hover) {
    .chatbot-close:hover {
        background: rgba(255, 255, 255, 0.2);
        color: #ffffff;
        transform: scale(1.05);
    }
}

/* =========================================================
   BODY
========================================================= */

.chatbot-body {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 24px 20px;
    background: #ffffffc4;
    scrollbar-width: thin;
    scrollbar-color: #d6d6d6 transparent;
}

.chatbot-welcome {
    max-width: 310px;
    margin: 18px auto 30px;
    text-align: center;
}

.welcome-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--chatbot-primary), color-mix(in srgb, var(--chatbot-primary) 80%, black));
    color: #ffffff;
    box-shadow: 0 12px 30px var(--chatbot-shadow);
    overflow: hidden;
}

.welcome-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.welcome-icon span {
    font-size: 23px;
}

.chatbot-welcome h2 {
    margin: 0;
    color: #111111;
    font-size: 25px;
    font-weight: 650;
    line-height: 1.2;
    letter-spacing: -0.035em;
}

.chatbot-welcome p {
    margin: 11px auto 0;
    color: #555555;
    font-size: 14px;
    line-height: 1.65;
}

/* =========================================================
   SUGGESTIONS
========================================================= */

.suggested-questions {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.suggested-questions button {
    position: relative;
    width: 100%;
    min-height: 54px;
    padding: 13px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--chatbot-primary);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    color: #343434;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

/* Reusable AI Animated Border Class */
.ai-animated-border {
    position: relative;
}

.ai-animated-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: conic-gradient(from var(--angle),
            transparent 0%,
            #4285f4 55%,
            #ea4335 65%,
            #fbbc05 75%,
            #34a853 85%,
            transparent 100%);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    animation: rotateBorderAngle 4s linear infinite;
    z-index: 0;
}

@keyframes rotateBorderAngle {
    to {
        --angle: 360deg;
    }
}

@media (hover: hover) {
    .suggested-questions button:hover {
        transform: translateY(-2px);
        background: rgba(255, 255, 255, 0.85);
    }
}

.suggested-questions button strong {
    flex-shrink: 0;
    color: var(--chatbot-primary);
    font-size: 16px;
    font-weight: 400;
    transition: transform 0.3s ease;
}

@media (hover: hover) {
    .suggested-questions button:hover strong {
        transform: translateX(4px);
    }
}

/* =========================================================
   INPUT AREA
========================================================= */

.chatbot-input-area {
    flex: 0 0 auto;
    padding: 13px 14px 11px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.chatbot-input-wrapper {
    width: 100%;
    min-height: 48px;
    height: 48px;
    padding: 4px 4px 4px 14px;
    display: flex;
    align-items: center;
    box-sizing: border-box !important;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.chatbot-input-wrapper:focus-within {
    border-color: var(--chatbot-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--chatbot-primary) 15%, transparent);
}

.chatbot-input-wrapper input#chatbot-input,
.chatbot-input-wrapper input[type="text"],
.chatbot-input-wrapper input {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: 100% !important;
    height: 40px !important;
    min-height: 40px !important;
    max-height: 40px !important;
    padding: 0 10px 0 0 !important;
    margin: 0 !important;
    float: none !important;
    clear: none !important;
    border: 0 !important;
    border-bottom: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    color: #171717 !important;
    font-family: inherit !important;
    font-size: 14px !important;
    line-height: normal !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.chatbot-input-wrapper input#chatbot-input:focus,
.chatbot-input-wrapper input[type="text"]:focus,
.chatbot-input-wrapper input:focus,
.chatbot-input-wrapper input#chatbot-input:focus-visible,
.chatbot-input-wrapper input[type="text"]:focus-visible,
.chatbot-input-wrapper input:focus-visible {
    border: 0 !important;
    border-bottom: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    border-color: transparent !important;
}

.chatbot-input-wrapper input#chatbot-input::-webkit-input-placeholder,
.chatbot-input-wrapper input::-webkit-input-placeholder {
    color: #9ca3af !important;
    -webkit-text-fill-color: #9ca3af !important;
    opacity: 1 !important;
}

.chatbot-input-wrapper input#chatbot-input::-moz-placeholder,
.chatbot-input-wrapper input::-moz-placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
}

.chatbot-input-wrapper input#chatbot-input:-ms-input-placeholder,
.chatbot-input-wrapper input:-ms-input-placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
}

.chatbot-input-wrapper input#chatbot-input::placeholder,
.chatbot-input-wrapper input::placeholder {
    color: #9ca3af !important;
    -webkit-text-fill-color: #9ca3af !important;
    opacity: 1 !important;
}

.chatbot-send {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: var(--chatbot-primary) !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    cursor: pointer !important;
    outline: none !important;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--chatbot-primary) 30%, transparent) !important;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (hover: hover) {
    .chatbot-send:hover {
        transform: scale(1.08);
        filter: brightness(1.1);
        box-shadow: 0 6px 16px color-mix(in srgb, var(--chatbot-primary) 40%, transparent);
    }
}

.chatbot-send:active {
    transform: scale(0.95);
}

.chatbot-powered {
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #a4a4a4;
    font-size: 10px;
    margin-top: 6px;
}

.chatbot-powered span {
    font-size: 9px;
    color: var(--chatbot-primary);
}

/* =========================================================
   ANIMATIONS
========================================================= */

@keyframes chatbotEnter {
    0% {
        opacity: 0;
        transform: scale(0.92) translateY(10px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes launcherGlow {

    0%,
    100% {
        transform: scale(0.85);
        opacity: 0.45;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* =========================================================
   MOBILE — FULL SCREEN
========================================================= */

@media (max-width: 600px) {
    .chatbot-launcher {
        right: 18px !important;
        bottom: 18px !important;
        left: auto !important;
        top: auto !important;
        width: 60px;
        height: 60px;
    }

    .chatbot-launcher.is-open {
        display: none !important;
    }

    .chatbot-window {
        position: fixed;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100%;
        height: 100%;
        height: 100dvh;
        min-height: 0;
        max-height: none;
        border: 0;
        border-radius: 0;
        transform-origin: center bottom !important;
        animation: chatbotMobileEnter 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .chatbot-header {
        flex-basis: 70px;
        min-height: 70px;
        padding-top: env(safe-area-inset-top);
        box-sizing: content-box;
        border-radius: 0;
    }

    .chatbot-body {
        padding: 26px 18px 28px;
    }

    .chatbot-welcome {
        margin-top: 28px;
    }

    .chatbot-input-area {
        padding: 11px 12px calc(11px + env(safe-area-inset-bottom));
        border-radius: 0;
    }

    .chatbot-input-wrapper input {
        font-size: 16px !important;
    }
}

@keyframes chatbotMobileEnter {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   MESSAGES
========================================================= */

.chatbot-messages {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 10px;
}

.message-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
}

.message-row.user {
    justify-content: flex-end;
}

.message-row.assistant {
    justify-content: flex-start;
}

.ai-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--chatbot-primary), color-mix(in srgb, var(--chatbot-primary) 80%, black));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px var(--chatbot-shadow);
    overflow: hidden;
}

.ai-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.message-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 85%;
}

.message-row.user .message-content {
    align-items: flex-end;
}

.message-row.assistant .message-content {
    align-items: flex-start;
}

.message-bubble {
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    animation: messageEnter 0.3s ease-out forwards;
    transform-origin: bottom center;
}

.message-user {
    background: var(--chatbot-primary);
    color: #ffffff;
    border-radius: 14px 14px 4px 14px;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--chatbot-primary) 20%, transparent);
}

.message-assistant {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: #222222;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 18px 18px 18px 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* =========================================================
   TYPING INDICATOR
========================================================= */

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 14px 16px;
    height: 44px;
    box-sizing: border-box;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #aaaaaa;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

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

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

@keyframes typingBounce {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes messageEnter {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =========================================================
   SOURCE CARDS
========================================================= */

.message-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.source-card {
    padding: 6px 10px;
    font-size: 11px;
    color: #555555;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

@media (hover: hover) {
    .source-card:hover {
        background: rgba(255, 255, 255, 0.9);
        border-color: var(--chatbot-primary);
        color: var(--chatbot-primary);
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    }
}

/* =========================================================
   SCROLL TO BOTTOM BUTTON
========================================================= */

.scroll-to-bottom-btn {
    position: absolute;
    bottom: 105px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--chatbot-primary);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    animation: btnFadeIn 0.2s ease-out;
}

@media (hover: hover) {
    .scroll-to-bottom-btn:hover {
        transform: translateX(-50%) translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
        background: #f8f8f8;
    }
}

.scroll-to-bottom-btn:active {
    transform: translateX(-50%) translateY(0);
}

@keyframes btnFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* =========================================================
   LEAD CAPTURE FORM
========================================================= */

.lead-capture-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin-top: 12px;
    padding: 6px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.lead-capture-form-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lead-capture-form input,
.lead-capture-form input[type="email"] {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: 100% !important;
    height: 36px !important;
    min-height: 36px !important;
    max-height: 36px !important;
    padding: 8px 12px !important;
    margin: 0 !important;
    float: none !important;
    clear: none !important;
    border: 0 !important;
    border-bottom: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    background-color: transparent !important;
    color: #111111 !important;
    font-family: inherit !important;
    font-size: 13px !important;
    line-height: normal !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.lead-capture-form input:focus,
.lead-capture-form input[type="email"]:focus,
.lead-capture-form input:focus-visible,
.lead-capture-form input[type="email"]:focus-visible {
    border: 0 !important;
    border-bottom: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    border-color: transparent !important;
}

.lead-capture-form input::-webkit-input-placeholder {
    color: #9ca3af !important;
    -webkit-text-fill-color: #9ca3af !important;
    opacity: 1 !important;
}

.lead-capture-form input::-moz-placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
}

.lead-capture-form input:-ms-input-placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
}

.lead-capture-form input::placeholder {
    color: #9ca3af !important;
    -webkit-text-fill-color: #9ca3af !important;
    opacity: 1 !important;
}

.lead-capture-form button {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--chatbot-primary) !important;
    color: white !important;
    border: 0 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    outline: none !important;
    transition: transform 0.2s ease, filter 0.2s;
}

.lead-capture-form button:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.lead-capture-success {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 6px 12px;
    font-size: 12px;
    color: #2b8a3e;
    background: #e9fac8;
    border-radius: 20px;
    font-weight: 500;
}

/* =========================================================
   MARKDOWN STYLES
========================================================= */

.message-bubble p {
    margin: 0 0 8px 0;
}

.message-bubble p:last-child {
    margin-bottom: 0;
}

.message-bubble strong {
    font-weight: 600;
}

.message-bubble ul {
    list-style-type: disc;
    margin: 4px 0 8px 0;
    padding-left: 20px;
}

.message-bubble ol {
    list-style-type: decimal;
    margin: 4px 0 8px 0;
    padding-left: 20px;
}

.message-bubble ul ul {
    list-style-type: circle;
    margin: 4px 0 6px;
}

.message-bubble ol ol,
.message-bubble ul ol,
.message-bubble ol ul {
    margin: 4px 0 6px;
}

.message-bubble li {
    margin-bottom: 4px;
}

.message-bubble li p {
    margin: 0;
}

.message-bubble h1,
.message-bubble h2,
.message-bubble h3,
.message-bubble h4,
.message-bubble h5,
.message-bubble h6 {
    margin: 12px 0 6px 0;
    font-weight: 600;
    line-height: 1.3;
}

.message-bubble a {
    color: inherit;
    text-decoration: underline;
}

.message-bubble code {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 4px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

.message-user code {
    background: rgba(255, 255, 255, 0.2);
}

.message-bubble pre {
    background: rgba(0, 0, 0, 0.05);
    padding: 8px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 8px 0;
}

.message-user pre {
    background: rgba(255, 255, 255, 0.1);
}