.property-assistant {
    --pa-ink: #123f5d;
    --pa-blue: #1769e0;
    --pa-yellow: #fab813;
    --pa-paper: #ffffff;
    --pa-soft: #eef4f8;
    --pa-muted: #526978;
    position: fixed;
    right: 25px;
    bottom: 102px;
    z-index: 99998;
    font-family: "Manrope", sans-serif;
    color: var(--pa-ink);
}

.property-assistant__launcher {
    min-width: 62px;
    height: 62px;
    padding: 0 19px;
    border: 0;
    border-radius: 31px;
    background: var(--pa-blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(8, 42, 70, .28); /* taste-skill-ignore: floating launcher */
    transition: transform .2s ease, background-color .2s ease;
}

.property-assistant__launcher:hover,
.property-assistant__launcher:focus-visible {
    background: #0e57c7;
    transform: translateY(-3px);
}

.property-assistant__launcher svg {
    width: 29px;
    height: 29px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.property-assistant__launcher-label {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.property-assistant__panel {
    position: absolute;
    right: 0;
    bottom: 78px;
    width: min(410px, calc(100vw - 30px));
    max-height: min(650px, calc(100vh - 140px));
    background: var(--pa-paper);
    border: 1px solid rgba(18, 63, 93, .12);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 55px rgba(8, 42, 70, .3); /* taste-skill-ignore: dialog overlay */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(18px) scale(.97);
    transform-origin: bottom right;
    transition: opacity .22s ease, visibility .22s ease, transform .22s ease;
}

.property-assistant__panel.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.property-assistant__header {
    min-height: 86px;
    padding: 15px 18px 14px;
    background: var(--pa-blue);
    color: #fff;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.property-assistant__identity img {
    display: block;
    width: 106px;
    height: auto;
    filter: brightness(0) invert(1);
}

.property-assistant__identity p {
    margin: 6px 0 0;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.property-assistant__close {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    transition: background-color .2s ease, transform .2s ease;
}

.property-assistant__close:hover,
.property-assistant__close:focus-visible {
    background: rgba(255, 255, 255, .16);
    transform: rotate(4deg);
}

.property-assistant__body {
    min-height: 270px;
    max-height: 470px;
    padding: 26px 22px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--pa-paper);
}

.property-assistant__prompt {
    margin-bottom: 22px;
}

.property-assistant__prompt h2 {
    margin: 0;
    color: var(--pa-ink);
    font-size: 25px;
    font-weight: 700;
    line-height: 1.16;
    letter-spacing: -.025em;
}

.property-assistant__prompt p,
.property-assistant__empty {
    margin: 11px 0 0;
    color: var(--pa-muted);
    font-size: 16px;
    line-height: 1.55;
}

.property-assistant__choice {
    width: 100%;
    min-height: 52px;
    margin-top: 10px;
    padding: 13px 16px;
    border: 0;
    border-radius: 10px;
    background: var(--pa-blue);
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    text-align: start;
    cursor: pointer;
    transition: transform .18s ease, background-color .18s ease;
}

.property-assistant__choice:hover,
.property-assistant__choice:focus-visible {
    background: #0e57c7;
    transform: translateX(4px);
}

.property-assistant__choice--secondary {
    background: var(--pa-soft);
    color: var(--pa-ink);
}

.property-assistant__choice--secondary:hover,
.property-assistant__choice--secondary:focus-visible {
    background: #dce9f1;
}

.property-assistant__results {
    margin: 0;
    padding: 0;
    list-style: none;
}

.property-assistant__results li + li {
    margin-top: 10px;
}

.property-assistant__results a {
    min-height: 56px;
    padding: 14px 45px 14px 15px;
    border-radius: 10px;
    background: var(--pa-soft);
    color: var(--pa-ink);
    display: flex;
    align-items: center;
    position: relative;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.property-assistant__results a::after {
    content: "→";
    position: absolute;
    right: 16px;
    color: var(--pa-blue);
    font-size: 21px;
}

.property-assistant__results a:hover,
.property-assistant__results a:focus-visible {
    background: var(--pa-yellow);
    color: #17344a;
    transform: translateX(4px);
}

.property-assistant__footer {
    min-height: 58px;
    padding: 8px 14px;
    background: var(--pa-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.property-assistant__text-button {
    min-height: 42px;
    padding: 7px 9px;
    border: 0;
    background: transparent;
    color: var(--pa-blue);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.property-assistant__text-button:hover,
.property-assistant__text-button:focus-visible {
    color: var(--pa-ink);
}

.property-chat__form { display: grid; gap: 14px; }
.property-chat__field { display: grid; gap: 6px; color: var(--pa-ink); font-size: 14px; font-weight: 700; }
.property-chat__field input,
.property-chat__field textarea,
.property-chat__composer textarea {
    width: 100%; border: 1px solid #c8d6df; border-radius: 9px; background: #fff; color: var(--pa-ink);
    padding: 11px 12px; font: inherit; line-height: 1.4; resize: vertical;
}
.property-chat__field textarea { min-height: 92px; }
.property-chat__consent { display: flex; align-items: flex-start; gap: 9px; color: var(--pa-muted); font-size: 13px; line-height: 1.45; }
.property-chat__consent input { width: 18px; height: 18px; margin-top: 1px; flex: 0 0 auto; accent-color: var(--pa-blue); }
.property-chat__error { margin: 0; color: #a52323; font-size: 13px; font-weight: 700; }
.property-assistant__body.is-chat { height: 330px; min-height: 330px; max-height: 330px; padding: 0; display: flex; flex-direction: column; overflow: hidden; background: #f4f7f9; }
.property-assistant__panel.is-chat-view .property-assistant__footer { display: none; }
.property-chat__context { padding: 11px 15px; border-bottom: 1px solid #dce5ea; background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.property-chat__context-text { min-width: 0; }
.property-chat__property { margin: 0 0 5px; color: var(--pa-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 800; }
.property-chat__status { margin: 0; color: var(--pa-muted); display: flex; align-items: center; gap: 7px; font-size: 12px; line-height: 1.35; }
.property-chat__status-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; background: #e1a018; box-shadow: 0 0 0 3px rgba(225,160,24,.13); }
.property-chat__status--active .property-chat__status-dot { background: #21a566; box-shadow: 0 0 0 3px rgba(33,165,102,.13); }
.property-chat__status--resolved .property-chat__status-dot,
.property-chat__status--closed .property-chat__status-dot { background: #8294a0; box-shadow: none; }
.property-chat__messages { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 9px; margin: 0; padding: 18px 16px; overflow-y: auto; scrollbar-width: thin; }
.property-chat__message { max-width: 82%; padding: 10px 13px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.45; box-shadow: 0 1px 2px rgba(18,63,93,.09); }
.property-chat__message--customer { align-self: flex-end; background: var(--pa-blue); color: #fff; border-bottom-right-radius: 4px; }
.property-chat__message--agent { align-self: flex-start; background: #fff; color: var(--pa-ink); border: 1px solid #e0e8ed; border-bottom-left-radius: 4px; }
.property-chat__message--system { align-self: center; max-width: 92%; padding: 6px 10px; background: transparent; color: var(--pa-muted); box-shadow: none; text-align: center; font-size: 12px; }
.property-chat__composer { flex: 0 0 auto; padding: 10px 12px; border-top: 1px solid #dce5ea; background: #fff; display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }
.property-chat__composer textarea { height: 42px; min-height: 42px; max-height: 88px; overflow-y: hidden; resize: none; border-color: #cbd8e0; border-radius: 11px; padding: 10px 12px; font-size: 13px; line-height: 20px; }
.property-chat__send { min-width: 65px; min-height: 42px; padding: 0 14px; border: 0; border-radius: 11px; background: var(--pa-blue); color: #fff; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.property-chat__end { flex: 0 0 auto; border: 0; background: transparent; color: #9a2f2f; padding: 6px 0; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.property-chat__end:hover, .property-chat__end:focus-visible { color: #6f1717; text-decoration: underline; }
.property-chat__ended { flex: 0 0 auto; padding: 11px 15px; border-top: 1px solid #eadca8; background: #fff4c9; color: #694f00; text-align: center; font-size: 13px; font-weight: 700; }
.property-chat__send:disabled,
.property-assistant__choice:disabled { opacity: .55; cursor: wait; }

html[dir="rtl"] .property-chat__message--customer { align-self: flex-start; border-radius: 12px 12px 3px 12px; }
html[dir="rtl"] .property-chat__message--agent { align-self: flex-end; border-radius: 12px 12px 12px 3px; }

.property-assistant :focus-visible {
    outline: 3px solid var(--pa-yellow);
    outline-offset: 2px;
}

html[dir="rtl"] .property-assistant {
    right: auto;
    left: 25px;
    font-family: "Tajawal", sans-serif;
}

html[dir="rtl"] .property-assistant__panel {
    right: auto;
    left: 0;
    transform-origin: bottom left;
    direction: rtl;
}

html[dir="rtl"] .property-assistant__choice:hover,
html[dir="rtl"] .property-assistant__choice:focus-visible,
html[dir="rtl"] .property-assistant__results a:hover,
html[dir="rtl"] .property-assistant__results a:focus-visible {
    transform: translateX(-4px);
}

html[dir="rtl"] .property-assistant__results a {
    padding: 14px 15px 14px 45px;
}

html[dir="rtl"] .property-assistant__results a::after {
    content: "←";
    right: auto;
    left: 16px;
}

@media (max-width: 600px) {
    .property-assistant {
        right: 15px;
        bottom: 86px;
    }

    html[dir="rtl"] .property-assistant {
        right: auto;
        left: 15px;
    }

    .property-assistant__launcher {
        width: 56px;
        min-width: 56px;
        height: 56px;
        padding: 0;
    }

    .property-assistant__launcher-label {
        position: absolute;
        width: 1px;
        height: 1px; /* taste-skill-ignore: accessible visually-hidden label */
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .property-assistant__panel,
    html[dir="rtl"] .property-assistant__panel {
        position: fixed;
        left: 15px;
        right: 15px;
        bottom: 155px;
        width: auto;
        max-height: calc(100dvh - 180px);
    }

    .property-assistant__body {
        max-height: calc(100dvh - 330px);
    }

    .property-assistant__body.is-chat {
        height: min(330px, calc(100dvh - 315px));
        min-height: min(330px, calc(100dvh - 315px));
        max-height: min(330px, calc(100dvh - 315px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .property-assistant *,
    .property-assistant *::before,
    .property-assistant *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
