.homza-realbot {
    --realbot-ink: #111;
    --realbot-muted: #626262;
    --realbot-line: #d7d7d7;
    --realbot-blue: #1769e0;
    max-width: 1240px;
    margin: 0 auto 22px;
    padding: 20px;
    border: 1px solid var(--realbot-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .06);
    color: var(--realbot-ink);
    font-family: inherit;
}

.homza-realbot.has-image {
    display: grid;
    grid-template-columns: minmax(150px, 240px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}
.homza-realbot__visual { min-width: 0; }

.homza-realbot__portrait {
    width: 100%;
    min-height: 0;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 11px;
    background: transparent;
}

.homza-realbot__portrait img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.homza-realbot__main {
    min-width: 0;
    align-self: center;
}

.homza-realbot__intro {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 14px;
}

.homza-realbot__mark {
    display: inline-flex;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--realbot-blue);
    color: #fff;
    font-size: 1.3rem;
    font-weight: 800;
}

.homza-realbot__intro h2 {
    margin: 0 0 2px;
    font-size: clamp(1.15rem, 2vw, 1.45rem);
    line-height: 1.2;
}

.homza-realbot__intro p {
    margin: 0;
    color: var(--realbot-muted);
}

.homza-realbot__search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
}

.homza-realbot__search input {
    width: 100%;
    min-height: 52px;
    box-sizing: border-box;
    padding: 11px 15px;
    border: 1px solid #bfc3c8;
    border-radius: 9px;
    background: #fff;
    color: var(--realbot-ink);
    font: inherit;
    font-size: 1rem;
}

.homza-realbot__search button {
    min-width: 145px;
    min-height: 52px;
    padding: 10px 20px;
    border: 1px solid var(--realbot-blue);
    border-radius: 9px;
    background: var(--realbot-blue);
    color: #fff;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.homza-realbot__search button:disabled {
    opacity: .7;
    cursor: wait;
}

.homza-realbot :where(input, button):focus-visible {
    outline: 3px solid var(--realbot-ink);
    outline-offset: 3px;
}

.homza-realbot__message {
    min-height: 1.25em;
    margin-top: 9px;
    color: var(--realbot-muted);
    font-size: .9rem;
}

.homza-realbot__message.is-error {
    color: #a61b1b;
    font-weight: 650;
}

.homza-realbot__conversation:empty { display: none; }
.homza-realbot__conversation {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
    padding-top: 14px;
    overflow: visible;
    border-top: 1px solid #e5e5e5;
}
.homza-realbot__bubble {
    max-width: 82%;
    padding: 10px 13px;
    border-radius: 12px;
    line-height: 1.45;
}
.homza-realbot__bubble.is-user { align-self: flex-end; background: #f1f3f5; color: #222; }
.homza-realbot__bubble.is-bot { align-self: flex-start; background: var(--realbot-blue); color: #fff; }
.homza-realbot__email-offer {
    display: block;
    width: 100%;
    max-width: none;
    border: 1px solid #d7dce1;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.homza-realbot__email-offer-slot { margin-top: 11px; }
.homza-realbot__email-offer-slot:empty { display: none; }
.homza-realbot__email-offer:not(:disabled):hover { border-color: var(--realbot-blue); }
.homza-realbot__email-offer:disabled { cursor: default; opacity: 1; }
.homza-realbot__cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.homza-realbot__card {
    position: relative;
    overflow: hidden;
    border: 1px solid #dedede;
    border-radius: 10px;
    background: #fff;
}
.homza-realbot__favorite {
    position: absolute;
    top: 9px;
    right: 9px;
    z-index: 5;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .95);
    color: #111;
    font: inherit;
    font-size: 1.65rem;
    line-height: 40px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 7px rgba(0, 0, 0, .2);
}
.homza-realbot__favorite.is-favorite { color: #d3243f; }
.homza-realbot__card-media {
    position: relative;
    overflow: hidden;
    background: #eee;
}
.homza-realbot__card-image {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: #eee;
}
.homza-realbot__photo-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .95);
    box-shadow: none;
}
.homza-realbot__photo-arrow.is-previous { left: 9px; }
.homza-realbot__photo-arrow.is-next { right: 9px; }
.homza-realbot__photo-counter {
    position: absolute;
    right: 9px;
    bottom: 9px;
    z-index: 2;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .72);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
}
.homza-realbot__card.is-clickable { cursor: pointer; }
.homza-realbot__card.is-clickable:focus-visible { outline: 3px solid #111; outline-offset: 3px; }
.homza-realbot__modal {
    position: fixed; inset: 0; z-index: 999999; display: none; align-items: center; justify-content: center;
    padding: 28px; background: rgba(0, 0, 0, .72);
}
.homza-realbot__modal.is-open { display: flex; }
.homza-realbot__modal-panel {
    position: relative; width: min(1100px, 100%); max-height: 92vh; overflow: auto;
    border-radius: 14px; background: #fff; box-shadow: 0 20px 70px rgba(0,0,0,.35);
}
.homza-realbot__modal-content { padding: 24px 30px 34px; color: #222; }
.homza-realbot__modal-close {
    position: sticky; top: 10px; right: 10px; z-index: 8; float: right; width: 44px; height: 44px;
    padding: 0; border: 0; border-radius: 50%; background: #fff; color: #111; font-size: 28px;
    line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.22);
}
body.homza-realbot-modal-open { overflow: hidden; }
.homza-realbot__detail-gallery { position: relative; clear: both; overflow: hidden; margin-bottom: 18px; border-radius: 10px; background: #111; }
.homza-realbot__detail-gallery > img { display: block; width: 100%; height: min(62vh,620px); object-fit: contain; }
.homza-realbot__detail-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin: 12px 0 18px; }
.homza-realbot__detail-actions button { padding: 11px 17px; border: 1px solid #111; border-radius: 7px; background: #fff; color: #111; font-weight: 700; cursor: pointer; }
.homza-realbot__detail-actions button.is-primary { border-color: #178a37; background: #22a447; color: #fff; }
.homza-realbot__detail-title { margin: 4px 0; clear: both; }
.homza-realbot__detail-price { margin: 5px 0 12px; font-size: 1.7rem; font-weight: 800; }
.homza-realbot__detail-facts { display: flex; gap: 12px 22px; flex-wrap: wrap; padding: 13px 0; border-block: 1px solid #e5e5e5; font-weight: 700; }
.homza-realbot__detail-section { margin-top: 24px; }
.homza-realbot__detail-section h3 { margin: 0 0 10px; }
.homza-realbot__detail-section p { white-space: pre-line; }
.homza-realbot__detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 22px; margin: 0; }
.homza-realbot__detail-item { display: grid; grid-template-columns: minmax(120px,1fr) 1.2fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid #eee; }
.homza-realbot__detail-item dt { font-weight: 700; }.homza-realbot__detail-item dd { margin: 0; }
.homza-realbot__rooms { width: 100%; border-collapse: collapse; }.homza-realbot__rooms td { padding: 9px; border-bottom: 1px solid #e5e5e5; }
.homza-realbot__detail-attribution { margin-top: 16px; }
.homza-realbot__detail-loading { padding: 50px 0; text-align: center; }
.homza-realbot__card-body { padding: 12px; }
.homza-realbot__card-price { display: block; font-size: 1.15rem; }
.homza-realbot__card-address { margin-top: 4px; font-weight: 650; }
.homza-realbot__card-meta,
.homza-realbot__card-brokerage { margin-top: 5px; color: #626262; font-size: .82rem; }
.homza-realbot__card-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.homza-realbot__card-actions button,
.homza-realbot__booking button {
    min-height: 38px;
    padding: 7px 11px;
    border: 1px solid #222;
    border-radius: 7px;
    background: #fff;
    color: #111;
    font: inherit;
    font-size: .84rem;
    font-weight: 700;
    cursor: pointer;
}
.homza-realbot__card-actions button.is-primary,
.homza-realbot__booking button { border-color: #178a37; background: #22a447; color: #fff; }
.homza-realbot__attribution { margin-top: 10px; }
.homza-realbot__attribution img { display: block; width: 90px; height: auto; }
.homza-realbot__pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 0 2px;
}
.homza-realbot__pagination button {
    min-width: 38px;
    min-height: 38px;
    padding: 6px 9px;
    border: 1px solid #c9c9c9;
    border-radius: 7px;
    background: #fff;
    color: #222;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.homza-realbot__pagination button.is-current {
    border-color: var(--realbot-blue);
    background: var(--realbot-blue);
    color: #fff;
    cursor: default;
}
.homza-realbot__page-gap { padding: 0 2px; color: #666; }
.homza-realbot__details-button {
    align-self: flex-start;
    min-height: 40px;
    padding: 8px 13px;
    border: 1px solid var(--realbot-blue);
    border-radius: 7px;
    background: var(--realbot-blue);
    color: #fff;
    font: inherit;
    font-size: .86rem;
    font-weight: 700;
    cursor: pointer;
}
.homza-realbot__favorites-panel {
    max-width: 680px;
    margin: 18px auto 4px;
    padding: 18px;
    border: 1px solid #d8d8d8;
    border-radius: 10px;
    background: #fafafa;
}
.homza-realbot__favorites-panel[hidden] { display: none; }
.homza-realbot__favorites-panel h3 { margin: 0 0 12px; }
.homza-realbot__favorites-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.homza-realbot__favorites-fields label { font-size: .86rem; font-weight: 650; }
.homza-realbot__favorites-fields input {
    display: block;
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
    margin-top: 4px;
    padding: 8px 10px;
    border: 1px solid #c9c9c9;
    border-radius: 7px;
    background: #fff;
    font: inherit;
}
.homza-realbot__favorites-panel button[type="submit"] {
    min-height: 40px;
    margin-top: 11px;
    padding: 8px 14px;
    border: 1px solid #111;
    border-radius: 7px;
    background: #111;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.homza-realbot__favorites-panel p { margin: 9px 0 0; color: #666; font-size: .8rem; }
.homza-realbot__selected { color: #555; font-size: .86rem; font-weight: 650; }
.homza-realbot.is-property-chat .homza-realbot__conversation {
    max-height: none;
    overflow: visible;
}
.homza-realbot.is-property-chat .homza-realbot__examples { display: none; }
.homza-realbot__property-focus {
    display: grid;
    grid-template-columns: minmax(280px, .85fr) minmax(360px, 1.45fr);
    gap: 20px;
    align-items: start;
}
.homza-realbot__focus-property .homza-realbot__card {
    box-shadow: 0 5px 18px rgba(0, 0, 0, .08);
}
.homza-realbot__focus-chat {
    min-width: 0;
    padding: 16px;
    border: 1px solid #dedede;
    border-radius: 10px;
    background: #fafafa;
}
.homza-realbot__focus-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.homza-realbot__focus-heading h3 {
    margin: 0;
    font-size: 1.05rem;
}
.homza-realbot__new-search {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 5px 10px;
    border: 1px solid #b9b9b9;
    border-radius: 7px;
    background: #fff;
    color: #222;
    font: inherit;
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
}
.homza-realbot__chat-thread {
    display: flex;
    flex-direction: column;
    gap: 11px;
    max-height: 520px;
    margin-top: 8px;
    overflow: auto;
}
.homza-realbot__chat-thread:empty { display: none; }
.homza-realbot__exchange {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e1e1e1;
}
.homza-realbot__exchange:last-child { border-bottom: 0; }
.homza-realbot__facts {
    display: grid;
    grid-template-columns: minmax(130px, .7fr) minmax(0, 1.3fr);
    margin: 0;
    border: 1px solid #e1e1e1;
    border-radius: 10px;
    background: #fff;
}
.homza-realbot__criteria,
.homza-realbot__relaxations,
.homza-realbot__refine-examples,
.homza-realbot__feedback {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin: 10px 0;
}
.homza-realbot__criterion,
.homza-realbot__relaxations button,
.homza-realbot__refine-examples button,
.homza-realbot__feedback button {
    min-height: 32px;
    padding: 5px 10px;
    border: 1px solid #cfd3d7;
    border-radius: 999px;
    background: #fff;
    color: #222;
    font: inherit;
    font-size: .78rem;
    cursor: pointer;
}
.homza-realbot__criterion { background: #f2f7f5; border-color: #aac9bc; }
.homza-realbot__refine-examples {
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: #fafafa;
}
.homza-realbot__refine-slot:empty { display: none; }
.homza-realbot__search-actions { display: flex; justify-content: flex-end; margin-top: 7px; }
.homza-realbot__search-actions:has(.homza-realbot__clear-search[hidden]) { display: none; }
.homza-realbot__clear-search {
    padding: 4px 9px;
    border: 0;
    background: transparent;
    color: #555;
    font: inherit;
    font-size: .78rem;
    text-decoration: underline;
    cursor: pointer;
}
.homza-realbot__refine-examples strong { width: 100%; font-size: .82rem; }
.homza-realbot__refine-examples button { background: #fff; }
.homza-realbot__quality {
    display: inline-block;
    margin-bottom: 7px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #eaf6ee;
    color: #185c32;
    font-size: .68rem;
    font-weight: 750;
}
.homza-realbot__quality.is-description { background: #fff3d6; color: #72520b; }
.homza-realbot__feedback { color: #666; font-size: .78rem; }
.homza-realbot__facts dt,
.homza-realbot__facts dd { margin: 0; padding: 9px 11px; border-bottom: 1px solid #ececec; }
.homza-realbot__facts dt { font-weight: 700; }
.homza-realbot__booking {
    padding: 16px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fafafa;
}
.homza-realbot__booking-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.homza-realbot__booking label { font-size: .86rem; font-weight: 650; }
.homza-realbot__booking label.wide { grid-column: 1 / -1; }
.homza-realbot__booking input,
.homza-realbot__booking textarea {
    display: block;
    width: 100%;
    min-height: 42px;
    box-sizing: border-box;
    margin-top: 4px;
    padding: 8px 10px;
    border: 1px solid #c9c9c9;
    border-radius: 7px;
    background: #fff;
    font: inherit;
}
.homza-realbot__booking button { margin-top: 11px; }
.homza-realbot__booking p { margin: 9px 0 0; color: #666; font-size: .76rem; }

.homza-realbot__examples {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 9px;
}

.homza-realbot__examples button {
    min-height: 34px;
    padding: 5px 11px;
    border: 1px solid #d7d7d7;
    border-radius: 999px;
    background: #f7f7f7;
    color: #333;
    font: inherit;
    font-size: .82rem;
    cursor: pointer;
}

.homza-realbot__spinner {
    display: none;
    width: 15px;
    height: 15px;
    margin-left: 7px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    vertical-align: -3px;
    animation: homza-realbot-spin .75s linear infinite;
}

.homza-realbot.is-busy .homza-realbot__spinner {
    display: inline-block;
}

@keyframes homza-realbot-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 620px) {
    .homza-realbot {
        padding: 16px;
    }

    .homza-realbot__search {
        grid-template-columns: 1fr;
    }

    .homza-realbot.has-image {
        grid-template-columns: 1fr;
    }

    .homza-realbot__portrait {
        min-height: 0;
        aspect-ratio: 16 / 9;
        max-height: 280px;
    }

    .homza-realbot__portrait img {
        aspect-ratio: 16 / 9;
    }

    .homza-realbot__search button {
        width: 100%;
    }

    .homza-realbot__cards,
    .homza-realbot__booking-grid,
    .homza-realbot__property-focus { grid-template-columns: 1fr; }
    .homza-realbot__focus-chat { padding: 12px; }
    .homza-realbot__focus-heading { align-items: flex-start; }
    .homza-realbot__booking label.wide { grid-column: auto; }
    .homza-realbot__favorites-fields { grid-template-columns: 1fr; }
    .homza-realbot__modal { padding: 9px; }
    .homza-realbot__modal-content { padding: 16px; }
    .homza-realbot__detail-gallery > img { height: 52vh; }
    .homza-realbot__detail-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .homza-realbot__spinner {
        animation-duration: 1.5s;
    }
}
