/* ============================================================
   RealNex Listings Pro — Widget CSS (featured & reduced)
   Uses the same CSS custom properties as the main theme so
   all 4 themes apply automatically.
   ============================================================ */

/* ── Widget container ───────────────────────────────────────── */
.rnlp-widget {
    width: 100%;
    margin: 0 0 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    font-size: 14px;
}

/* ── Scroll row ─────────────────────────────────────────────── */
.rnlp-widget-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--rnlp-border, #e2e8f0) transparent;
}
.rnlp-widget-scroll::-webkit-scrollbar { height: 4px; }
.rnlp-widget-scroll::-webkit-scrollbar-track { background: transparent; }
.rnlp-widget-scroll::-webkit-scrollbar-thumb { background: var(--rnlp-border, #e2e8f0); border-radius: 2px; }

/* 3-col grid on wider viewports */
@media (min-width: 900px) {
    .rnlp-widget-scroll {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        overflow-x: visible;
    }
}

/* 2-col grid on tablet/mobile */
@media (max-width: 899px) {
    .rnlp-widget-scroll {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        overflow-x: visible;
        flex-wrap: wrap;
    }
}

/* 1-col on small mobile */
@media (max-width: 480px) {
    .rnlp-widget-scroll {
        grid-template-columns: 1fr;
    }
}

/* ── Widget card ────────────────────────────────────────────── */
.rnlp-widget-card {
    position: relative;
    flex: 0 0 260px;
    background: var(--rnlp-card-bg, #fff);
    border: 1px solid var(--rnlp-border, #e2e8f0);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--rnlp-shadow, 0 1px 4px rgba(0,0,0,.06));
    transition: box-shadow .2s, transform .2s;
    display: flex;
    flex-direction: column;
}
.rnlp-widget-card:hover {
    box-shadow: var(--rnlp-shadow-hover, 0 4px 16px rgba(0,0,0,.12));
    transform: translateY(-2px);
}
.rnlp-widget-card-link {
    position: absolute;
    inset: 0;
    z-index: 5;
}

/* Card image */
.rnlp-widget-img {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e2e8f0;
    flex-shrink: 0;
}
.rnlp-widget-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}
.rnlp-widget-card:hover .rnlp-widget-img img { transform: scale(1.04); }

/* Card body */
.rnlp-widget-body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}
.rnlp-widget-name {
    font-size: 13px; font-weight: 600;
    color: var(--rnlp-card-text, #0f172a);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    line-height: 1.3;
}
.rnlp-widget-addr {
    font-size: 11px;
    color: var(--rnlp-meta-text, #64748b);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rnlp-widget-body .rnlp-inquire-btn {
    position: relative;
    z-index: 10;
    margin-top: 8px;
    width: 100%;
    height: 28px;
    font-size: 11px; font-weight: 500;
    border: 1px solid var(--rnlp-border, #e2e8f0);
    border-radius: 5px;
    background: transparent;
    color: var(--rnlp-meta-text, #64748b);
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    font-family: inherit;
}
.rnlp-widget-body .rnlp-inquire-btn:hover {
    background: var(--rnlp-accent, #013161);
    color: #fff;
    border-color: var(--rnlp-accent, #013161);
}

/* ── Price Reduced ribbon ───────────────────────────────────── */
.rnlp-widget-card--reduced .rnlp-widget-img { overflow: hidden; }

.rnlp-ribbon {
    position: absolute;
    top: 14px;
    right: -28px;
    width: 110px;
    background: #dc2626;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    text-align: center;
    padding: 4px 0;
    transform: rotate(45deg);
    transform-origin: center;
    z-index: 7;
    pointer-events: none;
    line-height: 1.2;
    box-shadow: 0 2px 4px rgba(0,0,0,.2);
}

/* ── Badge & price tag (reuse main classes) ─────────────────── */
.rnlp-widget .rnlp-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    z-index: 6;
    background: var(--rnlp-accent, #013161);
    color: #fff;
}
.rnlp-widget .rnlp-price-tag {
    position: absolute;
    bottom: 8px;
    left: 8px;
    z-index: 6;
    background: rgba(0,0,0,.62);
    color: #fff;
    font-size: 11px; font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}
.rnlp-widget .rnlp-badge--for-lease { background: #059669; }
.rnlp-widget .rnlp-badge--for-sale  { background: #1d4ed8; }
.rnlp-widget .rnlp-badge--sold      { background: #dc2626; }
.rnlp-widget .rnlp-badge--wanted    { background: #d97706; }
.rnlp-widget .rnlp-badge--leased    { background: #0891b2; }

/* ── Featured widget spacing ──────────────────────────────── */
.rnlp-widget--featured {
    padding-top: 32px;
}
.rnlp-widget--featured .rnlp-widget-scroll {
    padding-top: 0;
    gap: 24px;
    margin-top: 24px;
}
.rnlp-widget-img.no-photo {
    background: #e2e8f0;
}

.rnlp-marker-icon {
    background: none !important;
    border: none !important;
}