/* Listing comparison: header link, card toggle, bottom tray and /compare table. */
.header-actions .compare-header-link{position:relative;display:inline-flex;align-items:center;justify-content:center;padding:0;color:#263240}
.compare-count{position:absolute;right:0;top:0;min-width:17px;height:17px;padding:0 4px;border-radius:9px;background:var(--color-primary,#e52330);color:#fff;font-size:10px;font-weight:800;line-height:17px;text-align:center}
.compare-count[hidden]{display:none}
html[data-theme=dark] .header-actions .compare-header-link{color:#edf0f6}
@media(max-width:767px){.live-site .header-actions .compare-header-link{display:inline-flex;width:40px;height:40px}}
.compare-toggle{position:absolute;right:58px;top:10px;z-index:3;width:40px;height:40px;border-radius:50%;border:0;padding:0;display:grid;place-items:center;background:#172b3ddd;color:#fff;cursor:pointer}
.compare-toggle svg{width:20px;height:20px}
.compare-toggle.is-active{background:var(--color-primary,#e52330)}
.compare-toggle:focus-visible{outline:2px solid #fff;outline-offset:2px}
.compare-detail-button{display:inline-flex;align-items:center;gap:8px}
.compare-detail-button.is-active{border-color:var(--color-primary,#e52330);color:var(--color-primary,#e52330)}
.compare-bar{position:fixed;left:50%;bottom:16px;transform:translateX(-50%);z-index:900;width:min(880px,calc(100% - 32px));display:grid;grid-template-columns:minmax(120px,170px) minmax(0,1fr) auto;align-items:center;gap:14px;padding:12px 14px;border-radius:16px;background:#fff;border:1px solid #e6e6ea;box-shadow:0 10px 30px rgba(0,0,0,.15)}
.compare-bar[hidden]{display:none}
.compare-bar-head{display:flex;flex-direction:column;gap:2px;min-width:0}
.compare-bar-head span{color:#6b7280;font-size:.8rem;line-height:1.3}
.compare-bar-head span:empty{display:none}
.compare-slots{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;min-width:0}
.compare-slot{position:relative;display:flex;align-items:center;gap:8px;min-width:0;height:56px;padding:4px;border:1px solid #e6e6ea;border-radius:12px;background:#fafafb}
.compare-slot img,.compare-slot-placeholder{width:64px;height:48px;flex-shrink:0;border-radius:9px;object-fit:cover;background:#eef0f3}
.compare-slot-placeholder{display:grid;place-items:center;font-weight:700;color:#6b7280}
.compare-slot-title{font-size:.8rem;font-weight:600;line-height:1.25;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;padding-right:18px}
.compare-slot-remove{position:absolute;top:-8px;right:-8px;width:24px;height:24px;border-radius:50%;border:0;background:#172b3d;color:#fff;font-size:16px;line-height:1;cursor:pointer;display:grid;place-items:center}
.compare-slot-remove:hover{background:var(--color-primary,#e52330)}
.compare-slot.is-empty{justify-content:center;border-style:dashed;color:#9aa3b2;font-size:.85rem;font-weight:600;background:transparent}
.compare-bar-actions{display:flex;gap:8px;flex-shrink:0}
.compare-bar-actions .button{min-height:40px;padding:8px 14px}
.compare-bar-actions [aria-disabled=true]{opacity:.45;pointer-events:none}
html[data-theme=dark] .compare-bar{background:#161c26;border-color:#2c3546}
html[data-theme=dark] .compare-slot{background:#11151d;border-color:#2c3546}
@media(max-width:900px){.compare-bar{grid-template-columns:minmax(0,1fr) auto}.compare-slots{grid-column:1/-1;grid-row:2}}
@media(min-width:768px) and (max-width:1000px){.compare-slot-title{display:none}.compare-slot img,.compare-slot-placeholder{width:100%}}
@media(max-width:767px){.compare-bar{bottom:calc(80px + env(safe-area-inset-bottom));grid-template-columns:minmax(0,1fr);gap:10px;padding:10px;width:calc(100% - 20px)}.compare-bar-head strong{display:none}.compare-bar-head span{text-align:center}.compare-bar-head:not(:has(span:not(:empty))){display:none}.compare-bar-actions{grid-row:3}.compare-bar-actions .button{flex:1;justify-content:center;min-height:38px}.compare-slots{gap:8px}.compare-slot{height:auto;padding:3px}.compare-slot img,.compare-slot-placeholder{width:100%;height:48px}.compare-slot-title{display:none}.compare-slot.is-empty{min-height:56px;font-size:.75rem}.compare-slot-remove{width:22px;height:22px;top:-7px;right:-7px}}
body:has(.compare-bar:not([hidden])) .mq-chat-launch{bottom:calc(28px + var(--compare-bar-h,90px) + env(safe-area-inset-bottom))}
@media(max-width:767px){body:has(.compare-bar:not([hidden])) .mq-chat-launch{bottom:calc(92px + var(--compare-bar-h,135px) + env(safe-area-inset-bottom))}}

.compare-page{padding:24px 0 48px}
.compare-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:8px 0 20px}
.compare-heading h1{margin:0;font-size:clamp(1.4rem,3vw,2rem)}
.compare-only-diff{display:inline-flex;align-items:center;gap:8px;font-weight:600;cursor:pointer}
.compare-scroll{overflow-x:auto;border:1px solid #e6e6ea;border-radius:16px;background:#fff}
.compare-table{width:100%;min-width:calc(160px + var(--compare-columns) * 220px);border-collapse:collapse;table-layout:fixed}
.compare-table th,.compare-table td{padding:12px 14px;border-bottom:1px solid #eef0f3;text-align:left;vertical-align:top}
.compare-table thead th{vertical-align:bottom}
.compare-table tbody th,.compare-table thead th:first-child{position:sticky;left:0;z-index:1;width:160px;background:#fafafb;font-weight:600;color:#4b5563}
.compare-table tr:last-child>*{border-bottom:0}
.compare-item{display:flex;flex-direction:column;gap:8px}
.compare-item a{display:flex;flex-direction:column;gap:8px;color:inherit;text-decoration:none}
.compare-item img{width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:12px;background:#f3f4f6}
.compare-item strong{font-size:.95rem;line-height:1.35}
.compare-price{color:var(--color-primary,#e52330);font-weight:700}
.compare-remove{align-self:flex-start;border:0;background:none;padding:0;color:#6b7280;cursor:pointer;font:inherit;font-size:.85rem}
.compare-remove:hover{color:var(--color-primary,#e52330)}
.compare-add{font-weight:600;color:var(--color-primary,#e52330)}
.compare-differs td{background:var(--rental-soft,#fff0f1)}
.compare-table tr[hidden]{display:none}
.compare-note{margin-top:12px;color:#6b7280;font-size:.9rem}
html[data-theme=dark] .compare-scroll{background:#161c26;border-color:#2c3546}
html[data-theme=dark] .compare-table th,html[data-theme=dark] .compare-table td{border-color:#2c3546}
html[data-theme=dark] .compare-table tbody th,html[data-theme=dark] .compare-table thead th:first-child{background:#11151d;color:#a3aec0}

/* Phones: the label gets its own full-width line above each row, so all picked listings sit side by side. */
.compare-label-row{display:none}
@media(max-width:767px){
  .compare-table{min-width:0}
  .compare-table thead th:first-child,.compare-table tbody th[scope=row]{display:none}
  .compare-label-row{display:table-row}
  .compare-label-row[hidden]{display:none}
  .compare-label-row td{padding:10px 10px 2px;border-bottom:0;background:#fafafb;font-size:.75rem;font-weight:700;color:#6b7280;text-transform:none}
  .compare-table th,.compare-table td{padding:8px 10px;font-size:.82rem;word-break:break-word}
  .compare-table tbody tr:not(.compare-label-row) td{padding-top:4px;background:#fafafb}
  .compare-table tbody tr.compare-differs:not(.compare-label-row) td{background:var(--rental-soft,#fff0f1)}
  .compare-item strong{font-size:.8rem}
  .compare-price{font-size:.85rem}
  .compare-remove{font-size:.72rem;white-space:nowrap}
  .compare-heading{margin-bottom:12px}
  html[data-theme=dark] .compare-label-row td,html[data-theme=dark] .compare-table tbody tr:not(.compare-label-row) td{background:#11151d}
}
