#cyden-chat-launcher {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 99999999;
    /* show/hide animation */
    transition: opacity .3s ease, transform .3s ease;
}

.chat-launcher-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #163a5a;
    color: #fff;
    border: 0;
    border-radius: 28px;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(0,0,0,.18);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

    .chat-launcher-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 16px 36px rgba(0,0,0,.22);
        background: #1b4a73;
    }

    .chat-launcher-btn:active {
        transform: translateY(0);
        box-shadow: 0 10px 24px rgba(0,0,0,.18);
    }

    /* keyboard accessibility - makes it feel clickable */
    .chat-launcher-btn:focus-visible {
        outline: 3px solid rgba(201, 166, 77, .65);
        outline-offset: 3px;
    }

.chat-launcher-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: #c9a64d;
    border-radius: 50%;
    transition: transform .15s ease;
}

    .chat-launcher-icon i {
        font-size: 18px;
        /* Font Awesome duotone colours */
        --fa-primary-color: #ffffff;
        --fa-secondary-color: #163a5a;
        --fa-secondary-opacity: 0.9;
    }

.chat-launcher-btn:hover .chat-launcher-icon {
    transform: scale(1.05);
}

.chat-launcher-text {
    white-space: nowrap;
}

/* hidden -> visible states */
.chat-launcher-hidden {
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
}

.chat-launcher-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    #cyden-chat-launcher {
        transition: none;
    }

    .chat-launcher-btn,
    .chat-launcher-icon {
        transition: none;
    }
}

/* Overlay */
.cyden-chat-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.25);
    z-index: 99998;
    opacity: 1;
    transition: opacity .2s ease;
}

/* Panel container */
.cyden-chat-panel {
    position: fixed;
    right: 24px;
    bottom: 24px; /* sits above launcher button */
    width: 380px;
    max-width: calc(100vw - 48px);
    height: 560px;
    max-height: calc(100vh - 140px);
    background: #fff;
    border-radius: 0px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    z-index: 99999999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(12px);
    opacity: 1;
    transition: transform .25s ease, opacity .25s ease;
}

/* Hidden state */
.cyden-chat-hidden {
    opacity: 0;
    pointer-events: none;
}

.cyden-chat-panel.cyden-chat-hidden {
    transform: translateY(18px);
}

/* Header */
.cyden-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 14px;
    background: #163a5a;
    color: #fff;
}

.cyden-chat-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cyden-chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: #c9a64d;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

    .cyden-chat-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.cyden-chat-avatar-fallback {
    font-size: 18px;
}

.cyden-chat-meta {
    line-height: 1.1;
}

.cyden-chat-name {
    font-weight: 600;
    font-size: 15px;
}

.cyden-chat-role {
    font-size: 12px;
    opacity: .85;
    margin-top: 3px;
}

.cyden-chat-close {
    width: 34px;
    height: 34px;
    border-radius: 0px;
    border: 0;
    background: rgba(255,255,255,.14);
    color: #fff;
    cursor: pointer;
    font-size: 22px;
    line-height: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease;
}

    .cyden-chat-close:hover {
        background: rgba(255,255,255,.22);
    }

    .cyden-chat-close:focus-visible {
        outline: 3px solid rgba(201, 166, 77, .65);
        outline-offset: 3px;
    }

/* Messages */
.cyden-chat-messages {
    flex: 1 1 auto;
    padding: 14px;
    overflow-y: auto;
    background: #f6f7f9;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Bubbles */
.cyden-bubble {
    max-width: 90%;
    padding: 10px 12px;
    border-radius: 0px;
    font-size: 14px;
    line-height: 1.35;
    box-shadow: 0 6px 14px rgba(0,0,0,.08);
}

.cyden-bubble-assistant {
    background: #ffffff;
    color: #1c1c1c;
    align-self: flex-start;
    border-top-left-radius: 0px;
}

.cyden-bubble-user {
    background: #163a5a;
    color: #fff;
    align-self: flex-end;
    border-top-right-radius: 0px;
}

.cyden-bubble-assistant-property {
    background: white; /* let the card do the work */
    padding: 0; /* remove chat padding */
    gap: 10px;
    border-radius: 14px;
    min-width: 100% !important;
    box-shadow: none;
    border-radius: 0px;
    box-shadow: 0 6px 14px rgba(0,0,0,.08);
}

/* Footer + quick buttons */
.cyden-chat-footer {
    padding: 12px;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,.08);
}

.cyden-chat-quick {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cyden-quick-btn {
    width: 100%;
    text-align: left;
    border: 2px solid #c9a64d;
    background: #fff;
    border-radius: 0px;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
}

    .cyden-quick-btn:hover {
        background: rgba(201, 166, 77, .06);
        box-shadow: 0 10px 22px rgba(0,0,0,.08);
        transform: translateY(-1px);
    }

    .cyden-quick-btn:active {
        transform: translateY(0);
    }

    .cyden-quick-btn:focus-visible {
        outline: 3px solid rgba(201, 166, 77, .65);
        outline-offset: 3px;
    }


/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .cyden-chat-overlay,
    .cyden-chat-panel {
        transition: none;
    }
}

#cyden-chat-launcher.cyden-chat-hidden {
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
}

#cyden-chat-quick {
    max-height: 210px;
    overflow-y: auto;
    padding-right: 6px; /* so scrollbar doesn't overlap */
}

.cyden-chat-form {
    display: grid;
    gap: 10px;
}

    .cyden-chat-form .row2 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .cyden-chat-form input,
    .cyden-chat-form select,
    .cyden-chat-form textarea {
        width: 100%;
        border: 1px solid rgba(0,0,0,.12);
        border-radius: 12px;
        padding: 10px 12px;
        font-size: 14px;
        outline: none;
        background: #fff;
    }

    .cyden-chat-form textarea {
        min-height: 90px;
        resize: vertical;
    }

        .cyden-chat-form input:focus,
        .cyden-chat-form select:focus,
        .cyden-chat-form textarea:focus {
            border-color: rgba(22,58,90,.35);
            box-shadow: 0 0 0 3px rgba(201,166,77,.25);
        }

    .cyden-chat-form .policy {
        font-size: 12px;
        line-height: 1.35;
        color: rgba(0,0,0,.65);
    }

        .cyden-chat-form .policy a {
            color: #163a5a;
            font-weight: 600;
            text-decoration: underline;
        }

            .cyden-chat-form .policy a:hover {
                text-decoration: none;
            }

    .cyden-chat-form .submit-btn {
        width: 100%;
        border: 0;
        border-radius: 0px;
        padding: 12px 16px;
        background: #163a5a;
        color: #fff;
        font-weight: 600;
        cursor: pointer;
    }

        .cyden-chat-form .submit-btn:disabled {
            opacity: .6;
            cursor: not-allowed;
        }

.cyden-prop-card {
    background: #f1f1f1;
    border-radius: 14px;
    overflow: hidden;
}

.cyden-prop-link {
    display: grid;
    grid-template-columns: 110px 1fr 28px; /* image / content / chevron */
    gap: 12px;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.cyden-prop-img {
    width: 110px;
    height: 86px;
    overflow: hidden;
    border-radius: 0px;
    margin: 10px;
}

    .cyden-prop-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.cyden-prop-body {
    padding: 10px 0;
}

.cyden-prop-title {
    font-weight: 700;
    color: #163a5a;
    margin-bottom: 6px;
}

.cyden-prop-meta {
    display: flex;
    gap: 12px;
    color: #666;
}

.cyden-prop-price {
    font-weight: 700;
    color: #666;
}

.cyden-prop-chevron {
    font-size: 28px;
    color: #c9a64d;
    padding-right: 14px;
}

.badge {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    line-height: 1;
}

.badge-red {
    background: #c00000;
    color: #fff;
}

.badge-blue {
    background: #1e4f7a;
    color: #fff;
}

.badge-gold {
    background: #c9a24d;
    color: #fff;
}

.badge-default {
    background: #999;
    color: #fff;
}

.cyden-typing {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 6px 6px;
}

.cyden-typing span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(0,0,0,.35);
    display: inline-block;
    animation: cydenTyping 1.2s infinite ease-in-out;
}

.cyden-typing span:nth-child(2) {
    animation-delay: .15s;
}

.cyden-typing span:nth-child(3) {
    animation-delay: .30s;
}

#cyden-chat-panel,
#cyden-chat-messages {
    scrollbar-width: thin;
    scrollbar-color: #c9a24d transparent;
}

    /* WebKit (Chrome, Edge, Safari) */
    #cyden-chat-panel::-webkit-scrollbar,
    #cyden-chat-messages::-webkit-scrollbar {
        width: 8px;
    }

    #cyden-chat-panel::-webkit-scrollbar-track,
    #cyden-chat-messages::-webkit-scrollbar-track {
        background: transparent;
    }

    #cyden-chat-panel::-webkit-scrollbar-thumb,
    #cyden-chat-messages::-webkit-scrollbar-thumb {
        background-color: rgba(201, 162, 77, 0.55); /* gold */
        border-radius: 10px;
        border: 2px solid transparent;
        background-clip: content-box;
    }

        #cyden-chat-panel::-webkit-scrollbar-thumb:hover,
        #cyden-chat-messages::-webkit-scrollbar-thumb:hover {
            background-color: rgba(201, 162, 77, 0.85);
        }

.cyden-chat-form {
    scrollbar-width: thin;
    scrollbar-color: #d1d5db transparent;
}

    .cyden-chat-form::-webkit-scrollbar {
        width: 6px;
    }

    .cyden-chat-form::-webkit-scrollbar-thumb {
        background-color: rgba(0, 0, 0, 0.2);
        border-radius: 8px;
    }

#cyden-chat-panel {
    overflow: hidden;
}

#cyden-chat-messages {
    overflow-y: auto;
}

.cyden-chat-reset {
    background: transparent;
    border: none;
    color: #c9a24d; /* gold */
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 6px;
    margin-right: 6px;
    transition: background 0.2s ease, color 0.2s ease;
}

    .cyden-chat-reset:hover {
        background: rgba(201, 162, 77, 0.15);
        color: #e0b957;
    }

    .cyden-chat-reset i {
        font-size: 18px;
    }

@keyframes cydenTyping {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: .35;
    }

    40% {
        transform: translateY(-4px);
        opacity: .85;
    }
}

@media (max-width: 991.98px) {
    .chat-launcher-text {
        display: none !important;
    }

    .chat-launcher-btn {
        display: flex;
        align-items: center;
        gap: 10px;
        background: #163a5a;
        color: #fff;
        border: 0;
        border-radius: 90px;
        padding: 14px 14px;
        font-weight: 500;
        cursor: pointer;
        box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
        transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    }
}