/* ─────────────────────────────────────────────────────────────────────────────
   RR Property Compare
   Color philosophy: #2563eb only on primary CTAs and the single best-value
   accent. Everything else is neutral charcoal / slate gray.
   ───────────────────────────────────────────────────────────────────────────── */

/* ── Back to Properties button ──────────────────────────────────────────────── */
.rr-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 14px 7px 10px;
    margin: 0;
    width: fit-content;
    align-self: flex-start;
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all .2s ease;
    line-height: 1;
}
.rr-back-btn + * {
    margin-top: -10px !important;
}
.rr-back-btn:hover {
    background: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}
.rr-back-btn svg {
    flex-shrink: 0;
    opacity: .7;
}

/* ── Compare Button (property page) ────────────────────────────────────────── */
.rr-compare-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
    padding: 12px 24px;
    background: transparent;
    color: #475569;
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all .22s ease;
    font-family: inherit;
    line-height: 16px;
    white-space: nowrap;
    box-sizing: border-box;
}
.rr-compare-btn:hover {
    border-color: #334155;
    color: #1e293b;
    background: #f8fafc;
}
/* Selected: light blue tint — shows it's active without matching Apply Online */
.rr-compare-btn.is-selected {
    background: #dbeafe;
    color: #2563eb;
    border-color: #93c5fd;
}
.rr-compare-btn svg { flex-shrink: 0; pointer-events: none; }

/* ── Sticky Bar ─────────────────────────────────────────────────────────────── */
#rr-compare-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 9999;
    background: #1e293b;
    color: #fff;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 -2px 16px rgba(0,0,0,.25);
    border-top: 1px solid rgba(255,255,255,.08);
    transform: translateY(100%);
    transition: transform .3s ease;
}
#rr-compare-bar.is-visible { transform: translateY(0); }

.rr-bar__label {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,.45);
    letter-spacing: .1em;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}
.rr-bar__slots { display: flex; gap: 10px; flex: 1; }
.rr-bar__slot {
    display: flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,.05);
    border: 1px dashed rgba(255,255,255,.15);
    border-radius: 8px; padding: 7px 10px;
    min-width: 160px; flex: 1; max-width: 220px;
}
.rr-bar__slot.is-filled {
    border-style: solid;
    border-color: rgba(255,255,255,.25);
    background: rgba(255,255,255,.07);
}
.rr-bar__slot-thumb {
    width: 38px; height: 38px;
    border-radius: 5px; object-fit: cover;
    flex-shrink: 0; background: rgba(255,255,255,.1);
}
.rr-bar__slot-thumb.is-placeholder {
    display: flex; align-items: center; justify-content: center; opacity: .25;
}
.rr-bar__slot-title {
    font-size: 12px; font-weight: 600; color: #e2e8f0;
    line-height: 1.3; flex: 1;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rr-bar__slot-empty { font-size: 11px; color: rgba(255,255,255,.25); font-style: italic; }
.rr-bar__slot-remove {
    background: none; border: none;
    color: rgba(255,255,255,.3); cursor: pointer;
    padding: 2px; line-height: 0; flex-shrink: 0; transition: color .2s;
}
.rr-bar__slot-remove:hover { color: rgba(255,255,255,.8); }

.rr-bar__actions { display: flex; gap: 8px; flex-shrink: 0; }
/* Compare Now: the one place brand blue lives in the bar */
.rr-bar__compare-btn {
    padding: 10px 22px;
    background: #2563eb; color: #fff;
    border: none; border-radius: 7px;
    font-size: 14px; font-weight: 700;
    cursor: pointer; transition: background .2s; white-space: nowrap;
}
.rr-bar__compare-btn:hover { background: #1d4ed8; }
.rr-bar__compare-btn:disabled { opacity: .3; cursor: not-allowed; }
.rr-bar__clear-btn {
    padding: 10px 14px;
    background: transparent; color: rgba(255,255,255,.4);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 7px; font-size: 13px; cursor: pointer;
    transition: all .2s; white-space: nowrap;
}
.rr-bar__clear-btn:hover { color: rgba(255,255,255,.8); border-color: rgba(255,255,255,.3); }

/* ── Modal shell ─────────────────────────────────────────────────────────────── */
#rr-compare-modal {
    position: fixed; inset: 0; z-index: 99999;
    display: flex; align-items: flex-start; justify-content: center;
    padding: 32px 16px 48px; overflow-y: auto;
    opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
#rr-compare-modal.is-open { opacity: 1; pointer-events: all; }
.rr-modal__backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.65); cursor: pointer; }
.rr-modal__inner {
    position: relative;
    background: #f1f5f9;
    border-radius: 20px;
    width: 100%; max-width: 1060px;
    box-shadow: 0 24px 64px rgba(0,0,0,.2);
    overflow: hidden;
}
.rr-modal__header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 28px;
    background: #1e293b;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.rr-modal__header h2 { margin: 0; font-size: 18px; font-weight: 700; color: #fff; }
.rr-modal__close {
    background: none; border: none; cursor: pointer;
    color: rgba(255,255,255,.4); padding: 4px; line-height: 0;
    border-radius: 4px; transition: color .2s;
}
.rr-modal__close:hover { color: #fff; }
.rr-modal__loading { padding: 60px; text-align: center; color: #64748b; font-size: 15px; background: #fff; }

/* ── Comparison grid ─────────────────────────────────────────────────────────── */
.rr-ct__grid {
    display: grid;
    grid-template-columns: repeat(var(--rr-cols, 3), 1fr);
    gap: 12px; padding: 16px;
}

/* ── Property card ───────────────────────────────────────────────────────────── */
.rr-ct__card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    position: relative;
}
/* Best value: single restrained accent — border only, no box-shadow doubling */
.rr-ct__card.is-best-value {
    border: 2px solid #2563eb;
}

/* Best value badge — the ONE place blue gets used boldly in the modal */
.rr-ct__best-badge {
    position: absolute; top: 10px; left: 10px;
    background: #2563eb; color: #fff;
    font-size: 10px; font-weight: 800;
    letter-spacing: .05em; text-transform: uppercase;
    padding: 4px 9px; border-radius: 4px; z-index: 2;
    display: inline-flex; align-items: center; gap: 4px;
    box-shadow: 0 1px 6px rgba(37,99,235,.35);
}

/* Photo */
.rr-ct__photo {
    position: relative; width: 100%; padding-top: 60%;
    background: #f1f5f9; overflow: hidden; flex-shrink: 0;
}
.rr-ct__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rr-ct__photo-placeholder {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: #94a3b8; font-size: 13px; gap: 6px;
}

/* Card body */
.rr-ct__body { padding: 16px; display: flex; flex-direction: column; gap: 14px; flex: 1; }

/* Address */
.rr-ct__address { border-bottom: 1px solid #f1f5f9; padding-bottom: 12px; }
.rr-ct__address a {
    display: block; font-size: 15px; font-weight: 700; color: #0f172a;
    text-decoration: none; line-height: 1.3; transition: color .2s;
}
.rr-ct__address a:hover { color: #2563eb; }
.rr-ct__city-tag {
    display: inline-flex; align-items: center; gap: 4px;
    margin-top: 5px; font-size: 12px; color: #94a3b8; font-weight: 500;
}

/* Price */
.rr-ct__field-label {
    font-size: 10px; font-weight: 700; color: #94a3b8;
    text-transform: uppercase; letter-spacing: .08em; margin-bottom: 3px;
}
.rr-ct__price { font-size: 26px; font-weight: 800; color: #0f172a; line-height: 1; }
.rr-ct__price span { font-size: 13px; font-weight: 400; color: #94a3b8; }
/* Best value price gets the brand blue — one accent per card */
.rr-ct__card.is-best-value .rr-ct__price { color: #2563eb; }

/* Stats — icons neutral gray, not blue */
.rr-ct__stats {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 4px; background: #f8fafc; border-radius: 10px; padding: 10px 6px;
}
.rr-ct__stat { display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; }
.rr-ct__stat-icon { color: #94a3b8; line-height: 0; } /* neutral gray, not blue */
.rr-ct__stat-val { font-size: 14px; font-weight: 700; color: #1e293b; }
.rr-ct__stat-lbl { font-size: 10px; color: #94a3b8; text-transform: uppercase; letter-spacing: .04em; }

/* Amenities — neutral, not blue */
.rr-ct__amenities { display: flex; flex-wrap: wrap; gap: 4px; }
.rr-ct__chip {
    background: #f1f5f9; color: #475569;
    font-size: 11px; font-weight: 500;
    padding: 3px 9px; border-radius: 20px; white-space: nowrap;
}

/* Deposit badge — light informational, not a bold accent */
.rr-ct__deposit-badge {
    display: inline-flex; align-items: center; gap: 5px;
    background: #f0fdf4; color: #16a34a;
    font-size: 12px; font-weight: 600;
    padding: 5px 10px; border-radius: 6px;
    border-left: 3px solid #16a34a; /* green — distinct from blue CTAs */
    width: fit-content;
}

/* Actions */
.rr-ct__actions {
    margin-top: auto; padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    display: flex; flex-direction: column; gap: 8px;
}
/* Apply Online — primary CTA, brand blue */
.rr-ct__apply-btn {
    display: block; text-align: center;
    padding: 11px 16px;
    background: #2563eb; color: #fff !important;
    border-radius: 8px; font-size: 13px; font-weight: 700;
    text-decoration: none; transition: background .2s;
}
.rr-ct__apply-btn:hover { background: #1d4ed8; }
/* View Details — secondary CTA, charcoal ghost */
.rr-ct__details-btn {
    display: block; text-align: center;
    padding: 10px 16px;
    background: transparent; color: #334155 !important;
    border: 1.5px solid #cbd5e1; border-radius: 8px;
    font-size: 13px; font-weight: 600;
    text-decoration: none; transition: all .2s;
}
.rr-ct__details-btn:hover { border-color: #334155; background: #f8fafc; }

/* ── Mobile ──────────────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
    #rr-compare-bar { padding: 10px 14px; gap: 10px; }
    .rr-bar__label { display: none; }
    /* Hide empty slots — no need to show placeholders on small screens */
    .rr-bar__slot:not(.is-filled) { display: none; }
    /* Filled slots: thumbnail only, no title text */
    .rr-bar__slot.is-filled { min-width: auto; padding: 4px; flex: 0 0 auto; }
    .rr-bar__slot-title { display: none; }
    .rr-bar__slot-remove { padding: 0; }
    .rr-bar__slots { gap: 6px; flex: 0 0 auto; }
    .rr-bar__compare-btn { flex: 1; }
    .rr-ct__grid { grid-template-columns: 1fr; gap: 12px; padding: 12px; }
    #rr-compare-modal { padding: 12px 8px 32px; }
}