/* Photo galleries for ZEN's visual answer cards and their existing detail popup. */
body[data-neomain-page="main"] .az-chat-property-gallery,
body[data-neomain-page="main"] .az-detail-media { position: relative; }
body[data-neomain-page="main"] .az-chat-property-gallery { overflow: hidden; border-radius: 12px; isolation: isolate; }
.aznm-main-workspace .az-chat-result-card .az-chat-property-photo.az-chat-details-btn {
    display: block; width: 100%; min-height: 0; padding: 0 !important; border: 0 !important;
    border-radius: 12px !important; background: var(--az-raised) !important; overflow: hidden; cursor: zoom-in;
}
.aznm-main-workspace .az-chat-property-photo img { display: block; }
body[data-neomain-page="main"] .az-chat-gallery-arrow {
    position: absolute; top: 50%; z-index: 2; display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; min-height: 0; padding: 0; margin: 0; transform: translateY(-50%);
    border: 1px solid color-mix(in srgb, var(--az-line) 65%, transparent); border-radius: 50%;
    background: color-mix(in srgb, var(--az-surface) 90%, transparent); color: var(--az-text);
    box-shadow: 0 3px 14px #0003; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    cursor: pointer; font-size: 13px; transition: background .18s, color .18s, box-shadow .18s;
}
body[data-neomain-page="main"] .az-chat-gallery-arrow[data-az-gallery-step="-1"] { left: 9px; }
body[data-neomain-page="main"] .az-chat-gallery-arrow[data-az-gallery-step="1"] { right: 9px; }
body[data-neomain-page="main"] .az-chat-gallery-arrow:hover {
    background: var(--az-accent-soft); color: var(--az-accent-text); box-shadow: 0 3px 16px #0004;
}
body[data-neomain-page="main"] .az-chat-gallery-arrow:focus-visible { outline: 2px solid var(--az-focus); outline-offset: 3px; }
body[data-neomain-page="main"] .az-chat-gallery-counter {
    position: absolute; right: 10px; bottom: 10px; z-index: 1; padding: 4px 9px; border-radius: 999px;
    background: #102030bb; color: #fff; font-size: 11px; font-variant-numeric: tabular-nums;
    line-height: 1.4; direction: ltr; unicode-bidi: isolate; pointer-events: none; backdrop-filter: blur(8px);
}
body[data-neomain-page="main"] .az-chat-gallery-arrow[hidden],
body[data-neomain-page="main"] .az-chat-gallery-counter[hidden] { display: none; }
body[data-neomain-page="main"] .az-detail-media.is-property-gallery {
    display: flex !important; align-items: center; justify-content: center; background: var(--az-raised);
}
body[data-neomain-page="main"] .az-detail-media.is-property-gallery img {
    height: auto; max-height: min(70dvh, 650px); object-fit: contain;
}
@media (max-width: 900px) {
    body[data-neomain-page="main"] .az-chat-gallery-arrow { width: 42px; height: 42px; }
    body[data-neomain-page="main"] .az-detail-media.is-property-gallery { height: 240px; }
    body[data-neomain-page="main"] .az-detail-media.is-property-gallery img { height: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    body[data-neomain-page="main"] .az-chat-gallery-arrow { transition: none; }
}
