/*
 * Small front-end tweaks, every public page. Loaded by inc/belle-front.php.
 */

/* ── "Hot Deal" label badge (term slug hot-offer) ─────────────────────
 * Listing cards, search results, property page. Matched by the label's
 * link (/label/hot-offer/), not its term ID or name, so renaming the label
 * keeps the style. Overrides the per-label colour in Properties → Labels. */
a.hz-label[href*="/label/hot-offer"] {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding-left: 7px;
    background: #C2410C !important;
    color: #fff !important;
    font-weight: 700;
    letter-spacing: .04em;
    box-shadow: 0 2px 8px rgba(120, 30, 0, .35);
}
a.hz-label[href*="/label/hot-offer"]::before {
    content: "";
    flex: 0 0 auto;
    width: 11px;
    height: 11px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5c.6 3.9-1.8 5.9-3.3 7.8C7.2 11.1 6 13 6 15.3A6 6 0 0 0 12 21.5a6 6 0 0 0 6-5.9c0-2.3-1.1-4-2.2-5.4.1 1.6-.5 3.1-1.8 3.7.4-3.9-.6-8.2-2-12.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5c.6 3.9-1.8 5.9-3.3 7.8C7.2 11.1 6 13 6 15.3A6 6 0 0 0 12 21.5a6 6 0 0 0 6-5.9c0-2.3-1.1-4-2.2-5.4.1 1.6-.5 3.1-1.8 3.7.4-3.9-.6-8.2-2-12.4Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
a.hz-label[href*="/label/hot-offer"]:hover,
a.hz-label[href*="/label/hot-offer"]:focus {
    background: #A3360A !important;
    color: #fff !important;
}

/* ── "New Listing" label badge (term slug new-listing) ────────────────
 * Green, bold, no icon, so it stands out and differs from the orange
 * Hot Deal badge. Matched by link like the one above. */
a.hz-label[href*="/label/new-listing"] {
    background: #15803D !important;
    color: #fff !important;
    font-weight: 700;
    letter-spacing: .04em;
    box-shadow: 0 2px 8px rgba(10, 70, 30, .35);
}
a.hz-label[href*="/label/new-listing"]:hover,
a.hz-label[href*="/label/new-listing"]:focus {
    background: #116632 !important;
    color: #fff !important;
}

/* ── Home card frame (Hot Deals grid, New Listings carousel) ──────────
 * Houzez card widgets with CSS class "belle-hot-deals" or "belle-cards" (set
 * in Elementor → Advanced). Those widgets have no card padding/radius
 * controls; 8px / 8px matches the old Handpicked cards. */
.belle-hot-deals .grid-view .item-wrap.item-wrap-no-frame, /* beats main.css ".grid-view .item-wrap.item-wrap-no-frame { padding: 0 }" */
.belle-cards .grid-view .item-wrap.item-wrap-no-frame {
    padding: 8px;
    border-radius: 8px;
}

/* ── Home "New Listings" carousel (Property Cards Carousel v7, class
 * "belle-new-listings") ────────────────────────────────────────────── */
/* Same height for every card in the row (direct track only, not the photo sliders inside cards). */
.belle-cards .houzez-properties-carousel-js > .slick-list > .slick-track { display: flex; }
.belle-cards .houzez-properties-carousel-js > .slick-list > .slick-track > .slick-slide { height: auto; }

/* Header row: "View all new listings →" then round ‹ › buttons, right-aligned. */
.belle-new-listings .property-carousel-buttons-wrap {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 18px;
}
.belle-new-listings .property-carousel-buttons-wrap .btn-view-all {
    order: -1;
    margin-right: 8px;
    padding: 8px 4px;
    border: 0;
    background: none !important;
    font-size: 15px;
    font-weight: 600;
    color: var(--e-global-color-54c3f6d, #8E6D43);
}
.belle-new-listings .property-carousel-buttons-wrap .btn-view-all::after { content: " →"; }
.belle-new-listings .property-carousel-buttons-wrap .btn-view-all:hover,
.belle-new-listings .property-carousel-buttons-wrap .btn-view-all:focus {
    color: var(--e-global-color-text, #3C3633);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.belle-new-listings .property-carousel-buttons-wrap .slick-arrow {
    position: static;
    transform: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--e-global-color-primary, #AA8656);
    border-radius: 50%;
    background: #fff !important;
    color: var(--e-global-color-54c3f6d, #8E6D43);
    font-size: 0; /* hides "Prev" / "Next"; screen readers still read it */
    transition: background-color .15s ease, color .15s ease;
}
.belle-new-listings .property-carousel-buttons-wrap .slick-arrow::before {
    content: "";
    display: block !important; /* Houzez hides the slick arrow ::before */
    width: 18px;
    height: 18px;
    opacity: 1;
    background: currentColor !important;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 18l-6-6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 18l-6-6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.belle-new-listings .property-carousel-buttons-wrap .slick-next::before { transform: scaleX(-1); }
.belle-new-listings .property-carousel-buttons-wrap .slick-arrow:hover:not(.slick-disabled),
.belle-new-listings .property-carousel-buttons-wrap .slick-arrow:focus-visible {
    background: var(--e-global-color-primary, #AA8656) !important;
    color: #fff;
}
.belle-new-listings .property-carousel-buttons-wrap .slick-arrow.slick-disabled { opacity: .35; cursor: default; }

/* ── Listing card buttons (Call / Email / WhatsApp) ───────────────────
 * With three buttons on a narrow card (4 per row: Hot Deals, Handpicked)
 * WhatsApp runs past the card edge. When the footer is too narrow for the
 * labels, show icons only. The words stay in the page (font-size 0), so
 * screen readers still announce each button. Wider cards are unchanged. */
.item-footer.items-btns-count-3 { container-type: inline-size; }
@container (max-width: 249px) { /* the three labels need ~236px */
    /* extra classes: must beat main.css ".item-wrap-v9 .item-buttons-wrap .btn-item { font-size: 14px }" */
    .item-wrap .item-footer.items-btns-count-3 .item-buttons-wrap .btn-item { font-size: 0; gap: 0; min-width: 0; }
    .item-wrap .item-footer.items-btns-count-3 .item-buttons-wrap .btn-item .houzez-icon { font-size: 18px; }
}
