/* =========================
   CSS Variables (Theme)
   ========================= */
:root {
    --lfzw-fw-bold: 700;
    --lfzw-fw-medium: 600;
    --lfzw-fw-regular: 400;
    --lfzw-main-color: #2a2a33;
    --lfzw-font-main: 'Open Sans', 'Adjusted Arial', Tahoma, Geneva, sans-serif;
    --lfzw-gap: 28px;
    --lfzw-radius: 14px;
    --lfzw-blue: #2563eb;
    --lfzw-blue-dark: #183fa6;
    --lfzw-border: 1.5px solid #e5e7eb;
    --lfzw-bg-light: #f3f4f6;
    /* Carousel Button Styles */
    --lfzw-carousel-btn-size: 44px;
    --lfzw-carousel-btn-radius: 6px;
}

/* =========================
   Base Styles
   ========================= */
.lfzw-main-container {
    color: var(--lfzw-main-color);
    font-family: var(--lfzw-font-main);
    -webkit-font-smoothing: antialiased;
    margin: 0;
}

.lfzw-container {
    margin: 40px auto;
    padding: 0 24px;
}

/* =========================
   Agent Profile Layout
   ========================= */
.lfzw-agent-profile {
    display: flex;
    border-radius: 16px;
    padding: 32px 24px;
    border: var(--lfzw-border);
    gap: 2%;
}

.lfzw-agent-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lfzw-agent-photo-col {
    max-width: 25%;
}

.lfzw-agent-content-col {
    align-items: flex-start;
}

.lfzw-agent-action-col {
    margin-left: auto;
}

.lfzw-agent-photo {
    width: 140px;
    border-radius: 50%;
}

.lfzw-heading-main {
    margin: 0 0 8px 0;
}

/* =========================
   Star Icons
   ========================= */
.lfzw-star-svg {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 2px;
}

/* =========================
   Buttons
   ========================= */
.lfzw-btn,
button.lfzw-btn {
    font-family: var(--lfzw-font-main);
    font-size: 15px;
    font-weight: var(--lfzw-fw-medium);
    border-radius: 6px;
    padding: 10px 22px;
    border: 1.5px solid var(--lfzw-blue);
    cursor: pointer;
    background: transparent;
    color: var(--lfzw-main-color);
    transition: background 0.2s, color 0.2s;
}

.lfzw-btn-primary {
    background: var(--lfzw-blue);
    color: #fff;
    border: 1.5px solid var(--lfzw-blue);
}

.lfzw-btn-primary:hover {
    background: var(--lfzw-blue-dark);
    color: #fff;
}

.lfzw-btn-link {
    background: none;
    border: none;
    color: var(--lfzw-blue);
    font-size: 15px;
    font-family: var(--lfzw-font-main);
    font-weight: var(--lfzw-fw-medium);
    padding: 0 4px;
    cursor: pointer;
    text-decoration: underline;
    box-shadow: none;
    margin: 0 0 0 4px;
    display: inline;
}

.lfzw-btn-link:active {
    color: var(--lfzw-blue-dark);
}

.lfzw-btn-sm {
    font-size: 13px;
    padding: 2px 10px;
    margin-bottom: 0;
}

.lfzw-btn-equal-width {
    width: 100%;
    min-width: 140px;
}

/* =========================
   Premier Agent Badge
   ========================= */
.lfzw-premier-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.lfzw-premier-label {
    color: #18314f;
    font-family: var(--lfzw-font-main);
    font-weight: var(--lfzw-fw-bold);
    font-size: 16px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.lfzw-premier-icon {
    display: flex;
    align-items: center;
    margin-left: 2px;
    position: relative;
}

.lfzw-premier-tooltip {
    display: none;
    position: absolute;
    left: 50%;
    top: 120%;
    transform: translateX(-50%);
    min-width: 320px;
    max-width: 360px;
    background: #fff;
    border: var(--lfzw-border);
    border-radius: var(--lfzw-radius);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10);
    padding: 18px 18px 18px 18px;
    z-index: 99;
    font-family: var(--lfzw-font-main);
}

.lfzw-premier-tooltip-title {
    font-weight: var(--lfzw-fw-bold);
    font-size: 18px;
    margin-bottom: 8px;
}

.lfzw-premier-tooltip-body {
    font-size: 16px;
    color: var(--lfzw-main-color);
}

.lfzw-premier-icon:hover .lfzw-premier-tooltip,
.lfzw-premier-icon:focus .lfzw-premier-tooltip {
    display: block;
}

.lfzw-premier-icon svg {
    display: block;
}

.lfzw-premier-icon:hover,
.lfzw-premier-icon:focus {
    cursor: pointer;
}

/* =========================
   Reviews Summary Row
   ========================= */
.lfzw-reviews-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
}

.lfzw-reviews-star {
    display: flex;
    align-items: center;
}

.lfzw-reviews-link {
    color: var(--lfzw-blue);
    font-size: 15px;
    font-weight: var(--lfzw-fw-medium);
    text-decoration: none;
}

.lfzw-reviews-link:hover {
    text-decoration: underline;
}

/* =========================
   Reviews Grid & Card
   ========================= */
.lfzw-reviews-section {
    margin-top: 36px;
}

.lfzw-reviews-grid-wrap {
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: center;
}

.lfzw-reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--lfzw-gap);
    width: 100%;
    min-width: 0;
}

.lfzw-reviewbox-card {
    padding: 28px 24px 20px 24px;
    border-radius: var(--lfzw-radius);
    border: var(--lfzw-border);
    max-width: 800px;
    width: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.lfzw-reviewbox-header-row {
    display: flex;
    align-items: center;
    padding-bottom: 20px;
}

.lfzw-reviewbox-title {
    font-size: 22px;
    font-weight: var(--lfzw-fw-bold);
    margin-right: 6px;
}

.lfzw-masonry-grid .lfzw-reviewbox-title {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lfzw-reviewbox-rating {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: var(--lfzw-fw-bold);
    color: var(--lfzw-blue);
    gap: 2px;
}

.lfzw-reviewbox-report {
    margin-left: auto;
    color: var(--lfzw-blue);
    font-size: 16px;
    font-weight: var(--lfzw-fw-medium);
    text-decoration: none;
}

.lfzw-reviewbox-meta {
    font-size: 15px;
    color: #888;
    margin-bottom: 2px;
}

.lfzw-reviewbox-submeta {
    font-size: 15px;
    color: #444;
    margin-bottom: 12px;
}

.lfzw-reviewbox-stars-list {
    font-size: 13px;
    margin-bottom: 12px;
    color: #222;
    font-family: var(--lfzw-font-main);
}

.lfzw-reviewbox-body {
    font-size: 16px;
    color: var(--lfzw-main-color);
    line-height: 1.7;
    margin-bottom: 18px;
    word-break: break-word;
}

/* =========================
   Review Response (Agent Reply)
   ========================= */
.lfzw-reviewbox-response {
    background: var(--lfzw-bg-light);
    border-radius: 8px;
    padding: 16px 18px;
    margin-top: 18px;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
}

.lfzw-reviewbox-response-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 6px;
}

.lfzw-reviewbox-response-photo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
}

.lfzw-reviewbox-response-title {
    font-weight: 700;
    font-size: 16px;
    color: #222;
    margin-bottom: 2px;
}

.lfzw-reviewbox-response-date {
    color: var(--lfzw-blue);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.lfzw-reviewbox-response-body {
    font-size: 16px;
    font-weight: 400;
    color: var(--lfzw-main-color);
    margin-top: 2px;
    line-height: 1.7;
}

.lfzw-hide-response-btn {
    margin-top: 10px;
    display: inline-block;
}

/* =========================
   Carousel Styles
   ========================= */
.lfzw-reviews-carousel {
    overflow: hidden;
    width: 100%;
    max-width: 1100px;
    position: relative;
    z-index: 10;
}

.lfzw-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    background: #fff;
    box-shadow: 0 2px 8px #0001;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1.5px solid var(--lfzw-blue);
    opacity: 1;
    pointer-events: auto;
}

.lfzw-carousel-btn svg {
    width: 28px;
    height: 28px;
    display: block;
    stroke: var(--lfzw-blue);
}

.lfzw-carousel-btn-left {
    left: 8px;
}

.lfzw-carousel-btn-right {
    right: 35px;
}

#lfzw-carousel-track.lfzw-reviews-grid {
    overflow: visible;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: var(--lfzw-gap);
    width: auto;
    min-width: 0;
    align-items: stretch;
    transition: transform 0.5s cubic-bezier(.4, 1, .4, 1);
}

#lfzw-carousel-track .lfzw-reviewbox-card {
    flex: 0 0 340px;
    max-width: 340px;
    min-width: 340px;
    height: auto;
    box-sizing: border-box;
}

.lfzw-btn-link[data-readmore] {
    border: none;
    background: none;
    color: var(--lfzw-main-color);
    font-size: 15px;
    font-weight: 600;
    padding: 0;
    margin: 0;
    box-shadow: none;
    text-decoration: underline;
    cursor: pointer;
    display: inline;
}

.lfzw-btn.lfzw-carousel-btn,
button.lfzw-btn.lfzw-carousel-btn {
    padding: 0;
}

.lfzw-reviewbox-card.lfzw-horizontal-card {
    max-width: 1100px;
}

.lfzw-reviewbox-card.lfzw-horizontal-card .lfzw-btn[data-showresponse] {
    width: 180px;
    height: 40px;
    float: left;
    margin-top: 8px;
}

.lfzw-carousel-outer {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.lfzw-carousel-nav-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 8px;
}

.lfzw-carousel-nav-row .lfzw-carousel-btn {
    position: static;
    top: auto;
    left: auto;
    right: auto;
    transform: none;
    box-shadow: 0 2px 8px #0001;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1.5px solid var(--lfzw-blue);
    opacity: 1;
    pointer-events: auto;
    background: #fff;
}

.lfzw-carousel-nav-row .lfzw-carousel-btn-left {
    order: 1;
}

.lfzw-carousel-nav-row .lfzw-carousel-btn-right {
    order: 2;
}

.lfzw-carousel-flex {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto 32px auto;
    position: relative;
}

.lfzw-carousel-flex .lfzw-carousel-btn {
    position: static;
    top: auto;
    left: auto;
    right: auto;
    transform: none;
    margin: 0;
    z-index: 1;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    max-width: 40px;
    max-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.lfzw-carousel-flex .lfzw-reviews-carousel {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.lfzw-carousel-flex .lfzw-reviews-grid {
    display: flex;
    flex-direction: row;
    gap: 25px;
    width: 100%;
}

.lfzw-carousel-card,
.lfzw-carousel-flex .lfzw-reviews-grid .lfzw-carousel-card,
.carousel-card-320,
#lfzw-carousel-track .carousel-card-320 {
    flex: 0 0 320px;
    max-width: 320px;
    min-width: 320px;
    width: 320px;
    box-sizing: border-box;
}

/* Strongest specificity for carousel card width */
.lfzw-carousel-flex .lfzw-reviews-grid .lfzw-carousel-card {
    flex: 0 0 320px;
    max-width: 320px;
    min-width: 320px;
    box-sizing: border-box;
}

/* Force carousel card width to 320px */
.carousel-card-320 {
    flex: 0 0 320px;
    max-width: 320px;
    min-width: 320px;
    width: 320px;
    box-sizing: border-box;
}

/* Final override: force carousel cards to 320px inside carousel track */
#lfzw-carousel-track .carousel-card-320 {
    flex: 0 0 320px;
    max-width: 320px;
    min-width: 320px;
    width: 320px;
    box-sizing: border-box;
}

.lfzw-visible {
    display: block !important;
}

/* Horizontal card gap fix: ensure full width but visible gap between cards */
.lfzw-reviewbox-section {
    display: flex;
    flex-direction: column;
}

.lfzw-reviewbox-section .lfzw-horizontal-card {
    width: 100%;
    margin-bottom: var(--lfzw-gap);
}

.lfzw-reviewbox-section .lfzw-horizontal-card:last-child {
    margin-bottom: 0;
}

.lfzw-loading-wrapper {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: var(--lfzw-gap);
}

.lfzw-loading-wrapper img {
    height: 24px;
    width: 24px;
}

#lfzw_load_more_rvw {
    cursor: pointer;
}

@media (min-width: 900px) {
    .lfzw-reviewbox-section {
        flex-direction: column;
    }
}

/* =========================
   Responsive Styles
   ========================= */
@media (max-width: 900px) {

    /* Stack agent profile columns and adjust paddings for mobile */
    .lfzw-agent-profile {
        flex-direction: column;
        padding: 24px 8px;
        gap: 18px;
        min-height: 0;
        height: auto;
    }

    .lfzw-agent-photo-col,
    .lfzw-agent-content-col,
    .lfzw-agent-action-col {
        flex: 1 1 100%;
        max-width: 100%;
        align-items: center;
        text-align: center;
        padding: 0;
        margin: 0;
    }

    .lfzw-agent-content-col {
        align-items: center;
        text-align: center;
        padding: 0;
    }

    .lfzw-agent-photo {
        width: 110px;
        height: 110px;
    }

    .lfzw-reviews-summary {
        justify-content: center;
    }

    .lfzw-reviews-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .lfzw-reviewbox-card {
        padding: 18px 8px 14px 8px;
        max-width: 100%;
    }

    .lfzw-reviews-grid-wrap {
        max-width: 100%;
        padding: 0 8px;
    }
}

@media (max-width: 1100px) {

    /* Single column grid for smaller screens */
    .lfzw-reviews-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
}

@media (max-width: 700px) {

    /* Carousel cards take full viewport width on mobile */
    #lfzw-carousel-track .lfzw-reviewbox-card {
        min-width: 100vw;
        max-width: 100vw;
    }
}

@media (max-width: 1100px) {

    .lfzw-carousel-flex,
    .lfzw-reviews-carousel {
        max-width: 100%;
        width: 100%;
    }

    .lfzw-carousel-flex .lfzw-reviews-grid {
        gap: 16px;
    }

    .lfzw-carousel-card,
    .lfzw-carousel-flex .lfzw-reviews-grid .lfzw-carousel-card,
    .carousel-card-320,
    #lfzw-carousel-track .carousel-card-320 {
        flex: 0 0 90vw;
        max-width: 100%;
        min-width: 0;
        width: 90vw;
    }
}

@media (max-width: 700px) {

    .lfzw-carousel-flex,
    .lfzw-reviews-carousel {
        max-width: 100vw;
        width: 100vw;
        padding: 0;
    }

    .lfzw-carousel-flex .lfzw-reviews-grid {
        gap: 8px;
    }

    .lfzw-carousel-card,
    .lfzw-carousel-flex .lfzw-reviews-grid .lfzw-carousel-card,
    .carousel-card-320,
    #lfzw-carousel-track .carousel-card-320 {
        flex: 0 0 100vw;
        max-width: 100vw;
        min-width: 100vw;
        width: 100vw;
    }

    .lfzw-carousel-btn {
        width: 36px;
        height: 36px;
    }
}

/* Ensure all review cards use flex column layout (already present, but reinforce) */
.lfzw-reviewbox-card {
    display: flex;
    flex-direction: column;
}

/* Make card position relative for absolute children */
.lfzw-reviewbox-card {
    position: relative;
    padding-bottom: 56px;
    /* Add enough space for the button */
}

/* Remove absolute positioning for Show Response button */
.lfzw-btn[data-showresponse] {
    position: static;
    left: unset;
    right: unset;
    bottom: unset;
    margin-top: 18px;
    width: 100%;
}

/* Remove extra padding-bottom from card */
.lfzw-reviewbox-card {
    padding-bottom: 28px;
}

.lfzw-agent-initial-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--lfzw-blue, #2563eb);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    margin-right: 12px;
    flex-shrink: 0;
    letter-spacing: 1px;
    box-shadow: 0 1px 4px #0001;
    margin-bottom: 0;
}

/* Masonry layout for reviews using columns */
.lfzw-masonry-grid {
    column-count: 3;
    column-gap: var(--lfzw-gap);
    width: 100%;
}

.lfzw-masonry-grid .lfzw-reviewbox-card {
    display: inline-block;
    width: 100%;
    margin-bottom: var(--lfzw-gap);
    /* Remove max-width so cards fill column */
    max-width: none;
}

@media (max-width: 900px) {
    .lfzw-masonry-grid {
        column-count: 1;
    }
}

@media (min-width: 901px) and (max-width: 1200px) {
    .lfzw-masonry-grid {
        column-count: 2;
    }
}
