/**
 * Loop Property Plugin Styles
 * 
 * Basic structural styles only. Main styling should be done in theme SCSS files.
 * 
 * CSS classes generated by admin settings:
 * - .columns-2 or .columns-3 (based on Grid Column Count setting)
 * - .style-list (only added when List View is selected, Grid is default)
 * 
 * Example HTML output:
 * Default Grid: <div class="properties-grid columns-3" id="properties-grid">
 * List View:    <div class="properties-grid columns-3 style-list" id="properties-grid">
 */

/* Layout toggle buttons - basic functionality styles only */
.layout-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.layout-toggle .layout-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    border-radius: 4px;
}

.layout-toggle .layout-btn:hover {
    background: #f5f5f5;
}

.layout-toggle .layout-btn.active {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

/* Property lightbox - basic functionality styles only */
.property-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: none;
}

.lightbox-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    line-height: 1;
}

/* Notices */
.loop-property-notice {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    z-index: 1000;
    display: none;
}

.loop-property-notice.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.loop-property-notice.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95%;
        max-height: 95%;
    }
    
    .lightbox-close {
        top: -35px;
        font-size: 25px;
        width: 35px;
        height: 35px;
    }
}

/* --- Unavailable Property States (Global) --- */



.unavailable-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    text-align: center;
    padding: 10px;
}

.unavailable-message {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    max-width: 90%;
}

/* Unavailable image placeholder */
.image-placeholder--unavailable {
    background: #f5f5f5;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    text-align: center;
    padding: 20px;
    font-weight: bold;
}

.unavailable-notice {
    display: block;
    color: #999;
    font-size: 12px;
    font-style: italic;
    margin-top: 4px;
}

/* Unavailable action buttons */
.action-details--unavailable,
.action-enquire--unavailable {
    background: #f5f5f5 !important;
    color: #999 !important;
    cursor: not-allowed !important;
    opacity: 0.6;
    pointer-events: none;
}

/* Add visual indicator that property is unavailable */
.property-card:has(.property-title--unavailable) {
    position: relative;
    opacity: 1.0;
}

.property-card:has(.property-title--unavailable)::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    border-radius: inherit;
}


/* --- Property Card Unavailable States --- */
.image-container--unavailable {
    position: relative;
}
.property-card .actions .action-details--unavailable,  
.property-card .actions .action-enquire--unavailable {
    display: none;
}

.property-single-container a.button.button--whatsapp {
    background-color: #25d366;
    border: 1px solid #075e54;
    color: white;
}

.property-single-container a.button.button--whatsapp svg{
    fill: #fff;
    padding-right: 5px;
}

.button-card svg {
    padding-right: 5px;
}

.property-card {
    height:100%;
}

/* Compact listing cards (eXp): text colour comes from the theme/parent — no plugin defaults */
article.listing-card {
    color: inherit;
}

.property-card .actions {
    display: flex;
    gap: 10px;
}

.property-card .actions .action-link:hover {
    cursor: pointer;
}

.loop-property-page .listing-intro {
    margin: 0.35rem 0 1.25rem;
    max-width: 78ch;
    color: #2f2f2f;
}

.loop-property-page .listing-intro p {
    margin: 0 0 0.65rem;
    line-height: 1.55;
}

.loop-property-page .listing-intro p:last-child {
    margin-bottom: 0;
}

.loop-property-page .page-header .page-title {
    margin-bottom: 0;
}

.loop-property-page .listing-toolbar {
    align-items: center;
    margin-bottom: 1rem;
}

.loop-property-page .listing-toolbar-controls {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (min-width: 992px) {
    .loop-property-page .listing-toolbar-controls {
        justify-content: flex-end;
    }
}

.loop-property-page .count {
    font-size: 0.95rem;
    color: #2f2f2f;
}

.loop-property-page .sort-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-align: left;
}

.loop-property-page .sort-controls .sort-label {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: #2f2f2f;
}

.loop-property-page .sort-controls select {
    min-height: auto;
    padding: 2px 20px 2px 0;
    border: none;
    border-bottom: 1px solid rgba(47, 47, 47, 0.3);
    border-radius: 0;
    background-color: transparent;
    color: #2f2f2f;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.25;
}

.loop-property-page .sort-controls select:focus {
    outline: none;
    box-shadow: none;
    border-bottom-color: #2f2f2f;
}

.loop-property-page .view-toggle-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}

.loop-property-page .view-toggle-controls button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: none !important;
    box-shadow: none !important;
    color: #2f2f2f;
    font-size: 0.95rem;
    line-height: 1.2;
}

.loop-property-page .view-toggle-controls button .view-toggle-icon {
    display: block;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.loop-property-page .view-toggle-controls button.active {
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    background: none !important;
}

.loop-property-page .view-toggle-controls button:hover {
    opacity: 0.75;
}

/* Property listing pages: increase vertical card spacing on mobile */
@media (max-width: 768px) {
    .loop-property-page .global-grid.properties-grid-view#properties-grid,
    .loop-property-page #properties-grid {
        row-gap: 20px;
    }
}

/* ------------------------------------------------------------------------
   Listing search form: labelled cards (partials/advanced-search-form.php)

   Every filter is a card: a small bold label, the control beneath, a chevron
   on the right. Must have / Exclude are <details> cards whose menu drops
   below. The theme never targets these classes, so this block owns the look;
   a theme that wants its own accent sets --lp-search-accent on the container.
   ------------------------------------------------------------------------ */
.loop-advanced-search-container {
    --lp-search-accent: #5f5e60;
    --lp-search-text: #1d1d1f;
    --lp-search-muted: #6b6b6b;
    --lp-search-border: rgba(0, 0, 0, 0.14);
    --lp-search-radius: 10px;
    --lp-search-card-bg: #fff;
    /* Clear filters is a pill in its own colour so it reads as a control. */
    --lp-search-clear-bg: #fbeaea;
    --lp-search-clear-border: #efc2c2;
    --lp-search-clear-text: #8b2020;
}

.loop-advanced-search-container .search-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    margin: 0 0 12px;
}

.loop-advanced-search-container .search-card {
    position: relative;
    display: flex;
    flex: 1 1 160px;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    margin: 0;
    padding: 10px 14px 9px;
    border: 1px solid var(--lp-search-border);
    border-radius: var(--lp-search-radius);
    background: var(--lp-search-card-bg);
    box-sizing: border-box;
    text-align: left;
}

.loop-advanced-search-container .search-card:focus-within {
    border-color: var(--lp-search-accent);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

/* Location is the primary field: three times a filter's share of the row. */
.loop-advanced-search-container .search-card--location {
    flex: 3 1 320px;
}

.loop-advanced-search-container .search-card__label {
    display: block;
    margin: 0;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--lp-search-text);
}

.loop-advanced-search-container .search-card__control {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 1.9rem;
}

/* The card is the frame, so the control inside it is bare. Specific enough to
   beat the theme's .property-search-form select / input[type="text"] rules. */
.loop-advanced-search-container .search-card__control select,
.loop-advanced-search-container .search-card__control input[type="text"] {
    width: 100%;
    margin: 0;
    padding: 0 1.7rem 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font: inherit;
    font-size: 1rem;
    line-height: 1.3;
    color: var(--lp-search-muted);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.loop-advanced-search-container .search-card__control select:focus,
.loop-advanced-search-container .search-card__control input[type="text"]:focus {
    outline: none;
    border: 0;
    box-shadow: none;
}

.loop-advanced-search-container .search-card__control input[type="text"]::placeholder {
    color: var(--lp-search-muted);
}

/* A value that has been chosen reads darker than the "Any" placeholder. */
.loop-advanced-search-container .search-card__control select:not(:invalid),
.loop-advanced-search-container .search-card__control input[type="text"] {
    color: var(--lp-search-text);
}

.loop-advanced-search-container .search-card__control select option {
    color: var(--lp-search-text);
}

/* Chevron for selects and the dropdown cards: two borders of a rotated square. */
.loop-advanced-search-container .search-card__control--select::after,
.loop-advanced-search-container .search-card__summary::after {
    content: "";
    position: absolute;
    right: 6px;
    top: 50%;
    width: 0.55rem;
    height: 0.55rem;
    border-right: 2px solid var(--lp-search-accent);
    border-bottom: 2px solid var(--lp-search-accent);
    transform: translateY(-70%) rotate(45deg);
    pointer-events: none;
}

.loop-advanced-search-container .search-card__icon {
    position: absolute;
    right: 4px;
    width: 1.15rem;
    height: 1.15rem;
    color: var(--lp-search-accent);
    pointer-events: none;
}

/* --- Must have / Exclude: dropdown cards --------------------------------- */
.loop-advanced-search-container .search-card--dropdown {
    padding: 0;
}

.loop-advanced-search-container .search-card__summary {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 14px 9px;
    list-style: none;
    cursor: pointer;
}

.loop-advanced-search-container .search-card__summary::-webkit-details-marker {
    display: none;
}

.loop-advanced-search-container .search-card__summary::after {
    right: 20px;
    top: 62%;
}

.loop-advanced-search-container .search-card--dropdown[open] .search-card__summary::after {
    transform: translateY(-20%) rotate(-135deg);
}

.loop-advanced-search-container .search-card__value {
    min-height: 1.3em;
    padding-right: 1.7rem;
    font-size: 1rem;
    line-height: 1.3;
    color: var(--lp-search-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.loop-advanced-search-container .search-card__value.is-active {
    color: var(--lp-search-text);
    font-weight: 600;
}

.loop-advanced-search-container .search-card__menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 60;
    min-width: 14rem;
    padding: 8px 10px;
    border: 1px solid var(--lp-search-border);
    border-radius: var(--lp-search-radius);
    background: var(--lp-search-card-bg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
}

.loop-advanced-search-container .filter-options-grid--menu {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.loop-advanced-search-container .search-card__option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
    padding: 7px 6px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.3;
    color: var(--lp-search-text);
    cursor: pointer;
}

.loop-advanced-search-container .search-card__option:hover {
    background: rgba(0, 0, 0, 0.04);
}

.loop-advanced-search-container .search-card__option input[type="checkbox"] {
    flex: 0 0 auto;
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    accent-color: var(--lp-search-accent);
}

/* --- Must have / Exclude as pills: when the site has no Location search the
       options sit in a labelled row of toggles beneath the cards ------------ */
.loop-advanced-search-container .search-pills-row {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 28px;
    min-width: 0;
    margin: 0;
}

.loop-advanced-search-container .search-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.loop-advanced-search-container .search-pills__label {
    margin: 0 2px 0 0;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--lp-search-text);
}

.loop-advanced-search-container .filter-options-grid--pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.loop-advanced-search-container .search-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 6px 14px;
    border: 1px solid var(--lp-search-border);
    border-radius: 999px;
    background: var(--lp-search-card-bg);
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.3;
    color: var(--lp-search-text);
    cursor: pointer;
    user-select: none;
    transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}

.loop-advanced-search-container .search-pill:hover {
    border-color: var(--lp-search-accent);
}

/* The box stays for the keyboard and the script; the pill is what you see. */
.loop-advanced-search-container .search-pill input[type="checkbox"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}

.loop-advanced-search-container .search-pill:focus-within {
    outline: 2px solid var(--lp-search-accent);
    outline-offset: 2px;
}

.loop-advanced-search-container .search-pill.is-active {
    border-color: var(--lp-search-accent);
    background: var(--lp-search-accent);
    color: #fff;
}

/* A small tick drawn from two borders, so no icon font is needed. */
.loop-advanced-search-container .search-pill.is-active::before {
    content: "";
    display: inline-block;
    width: 0.35em;
    height: 0.65em;
    margin: 0 0.55em 0 0;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-0.1em) rotate(45deg);
}

/* --- The row beneath the cards. Lia's icon pill sits beside Clear filters at
       the right in both layouts. Location off adds the Must have / Exclude
       pills at the left, and her "Lia is showing:" line then takes a line of
       its own beneath them. ----------------------------------------------- */
.loop-advanced-search-container .search-clear-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 10px;
    margin-top: 10px;
}

.loop-advanced-search-container .search-clear-row .clear-filters-btn-subtle {
    margin-left: auto;
}

.loop-advanced-search-container .search-clear-row .lia-entry {
    margin-left: auto;
}

.loop-advanced-search-container .search-clear-row .lia-entry + .clear-filters-btn-subtle {
    margin-left: 0;
}

.loop-advanced-search-container .search-clear-row--pills .lia-applied {
    flex: 1 1 100%;
    order: 10;
    margin: 0;
}

.loop-advanced-search-container .clear-filters-btn-subtle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    padding: 6px 14px;
    border: 1px solid var(--lp-search-clear-border);
    border-radius: 999px;
    background: var(--lp-search-clear-bg);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--lp-search-clear-text);
    text-decoration: none;
    cursor: pointer;
    box-shadow: none;
    transition: border-color 0.15s, background-color 0.15s;
}

.loop-advanced-search-container .clear-filters-btn-subtle::before {
    content: "\00d7";
    font-size: 1.1em;
    line-height: 1;
}

.loop-advanced-search-container .clear-filters-btn-subtle:hover,
.loop-advanced-search-container .clear-filters-btn-subtle:focus {
    border-color: var(--lp-search-clear-text);
    color: var(--lp-search-clear-text);
}

/* Nothing to clear: the pill is there but plainly inert. */
.loop-advanced-search-container .clear-filters-btn-subtle:disabled,
.loop-advanced-search-container .clear-filters-btn-subtle:disabled:hover {
    opacity: 0.45;
    cursor: default;
    border-color: var(--lp-search-clear-border);
}

.loop-advanced-search-container .clear-filters-btn-subtle:focus {
    outline: none;
}

.loop-advanced-search-container .clear-filters-btn-subtle:focus-visible {
    outline: 2px solid var(--lp-search-accent);
    outline-offset: 2px;
}

/* --- Narrower screens: two cards a row, then one; menus open in place ---- */
@media (max-width: 1023px) {
    .loop-advanced-search-container .search-card {
        flex: 1 1 calc(50% - 6px);
    }

    .loop-advanced-search-container .search-card--location {
        flex: 1 1 100%;
    }
}

@media (max-width: 600px) {
    .loop-advanced-search-container .search-card {
        flex: 1 1 100%;
    }

    .loop-advanced-search-container .search-card__menu {
        position: static;
        margin: 0 10px 8px;
        padding: 4px 0 0;
        border: 0;
        border-top: 1px solid var(--lp-search-border);
        border-radius: 0;
        box-shadow: none;
    }
}

/* Pagination / Load More container – visibility controlled by inline style and JS (no !important) */
#pagination-container.properties-pagination,
.properties-pagination#pagination-container {
    min-height: 1px;
    font-size: 1rem;
    line-height: 1.5;
}
.properties-pagination .pagination-info {
    display: block;
    visibility: visible;
    margin-bottom: 0.75rem;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.5;
}
.properties-pagination .pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    visibility: visible;
}
.properties-pagination .pagination-btn {
    display: inline-block;
    visibility: visible;
    padding: 0.4rem 0.9rem;
    border: 1px solid #ccc;
    background: #f6f7f7;
    color: #333;
    cursor: pointer;
    border-radius: 3px;
    font-size: 0.95rem;
    line-height: 1.4;
}
.properties-pagination .pagination-btn:hover:not([disabled]) {
    background: #eee;
    border-color: #999;
}
.properties-pagination .pagination-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}
.properties-pagination .pagination-current {
    display: inline-block;
    visibility: visible;
    font-weight: 600;
    color: #1d2327;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Count row: hide content but keep layout space (avoids Sort by shifting left) */
#loop-property-count-row.loop-property-count-row--hidden {
    visibility: hidden;
}

/* Property listing loading state (initial load & filter updates) */
.properties-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    padding: 2rem;
    text-align: center;
}
.properties-loading .loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(0, 0, 0, 0.08);
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: loop-property-spin 0.8s linear infinite;
    margin-bottom: 1rem;
}
.properties-loading .loading-text {
    margin: 0;
    color: #1d2327;
    font-size: 1rem;
}
@keyframes loop-property-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .loop-advanced-search-container .search-filters-row {
        grid-template-columns: 1fr;
        align-items: start;
    }
    /* Stack search columns on mobile */
    .loop-advanced-search-container .search-column {
        flex: 1 1 100%;
    }
}

/* Single property sidebar: agent card
 *
 * Structure (1.5.55+):
 *   .agent-card                  block container
 *     .agent-card__primary       flex row: avatar | name (+ optional desc)
 *     .agent-card__action        full-width call button
 *
 * Was a CSS grid in 1.5.53/54 (auto 1fr with action spanning 1 / -1).
 * Some giro-2 theme stacks were stretching the info column and pushing
 * the name to wrap on the right — explicit flex with a fixed-width
 * avatar col is more robust under theme overrides.
 *
 * Vertical alignment of the primary row flips between two states:
 *   - Default (no description): align-items: center → name sits visually
 *     centred next to the avatar so a short single-line name doesn't look
 *     stranded at the top of a 66px avatar.
 *   - .agent-card--has-desc: align-items: flex-start → name + description
 *     stacked top-aligned alongside the avatar's top edge.
 */
.agent-card {
    margin-top: 0.5rem;
}
.agent-card__primary {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.agent-card--has-desc .agent-card__primary {
    align-items: flex-start;
}
.agent-card__col--image {
    flex: 0 0 66px;
    width: 66px;
    max-width: 66px;
}
.agent-card__col--info {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
}
.agent-card__col--info > * {
    text-align: left;
    max-width: 100%;
}
.agent-card .agent-card__action {
    width: 100%;
    margin-top: 0.75rem;
}
.agent-card__image-wrap {
    width: 66px;
    height: 66px;
    border-radius: 50%;
    overflow: hidden;
    background: #f0f0f1;
}
.agent-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}
.agent-card__name {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.3;
}
/* Fallback "Contact" link styling — used only when the agent has no phone
 * (resolver returned null/empty after the toggle + branch fallback). The
 * primary action button (.button--property-agent-call) is styled with the
 * shared sidebar button classes below and doesn't pass through this rule. */
.agent-card__action .contact-agent,
.agent-card__action a.contact-agent,
.agent-card__action button.contact-agent {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
    text-decoration: none;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    cursor: pointer;
    color: inherit;
    font-family: inherit;
    box-shadow: none !important;
}
.agent-card__action .contact-agent:hover {
    text-decoration: underline;
}

/* -----------------------------------------------------------------------------
 * Property sidebar "Call …" button — dual-label layout
 *
 * Used by:
 *   - Interested? card direct-call button (always the branch number)
 *   - Agent card direct-call button (1.5.52+, matches Interested? card style
 *     so visitors clearly see "this is a button you can press to call",
 *     not a small text link)
 *
 * Layout: phone icon on the left, label + number stacked on the right.
 * -------------------------------------------------------------------------- */
.button--property-sidebar-direct-call {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-align: left;
}
.button--property-sidebar-direct-call .property-sidebar-call-button__text {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}
.button--property-sidebar-direct-call .property-sidebar-call-button__label {
    font-size: 0.78rem;
    font-weight: 500;
    opacity: 0.85;
    letter-spacing: 0.01em;
}
.button--property-sidebar-direct-call .property-sidebar-call-button__number {
    font-size: 1rem;
    font-weight: 700;
}

/* Agent card variant — full-width call button. The .button--property-agent-call
 * class avoids the .contact-agent override above, and the .agent-card__action
 * grid placement (defined alongside .agent-card) makes the button span both
 * columns of the agent-card grid. */
.agent-card__action .button--property-agent-call {
    display: inline-flex;
    width: 100%;
}

.agent-card__company-desc {
    margin-top: 0.35rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.45;
    color: inherit;
    opacity: 0.9;
    text-align: left;
}
.agent-card__company-desc p {
    margin: 0 0 0.5em 0;
}
.agent-card__company-desc p:last-child {
    margin-bottom: 0;
}

.property-single-container #description .text.is-hidden {
    display: none;
}

.property-single-container #description .description-read-more {
    margin: 12px 0 20px;
}

.property-single-container #description .description-read-more__button {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

/* ------------------------------------------------------------------------
   Lia, the visitor's property search assistant (includes/loop-property-lia.php)
   A default look only; themes are expected to restyle. Colours lean on the
   theme's primary where it exposes one.
   ------------------------------------------------------------------------ */
/* Lia on the row beneath the cards: her "Lia is showing:" line at the left,
   her icon pill beside Clear filters at the right. The button's title and
   aria-label carry her name, so the pill shows only the star. */
.loop-advanced-search-container .lia-applied {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0 auto 0 0;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #2f2f2f;
}

.loop-advanced-search-container .lia-entry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    margin: 0;
    padding: 0;
    border: 1px solid var(--lp-search-border);
    border-radius: 999px;
    background: var(--lp-search-card-bg);
    color: var(--colour-primary, #2271b1);
    cursor: pointer;
    box-shadow: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.loop-advanced-search-container .lia-entry:hover,
.loop-advanced-search-container .lia-entry:focus-visible {
    border-color: var(--lp-search-accent);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
    outline: none;
}

.loop-advanced-search-container .lia-entry__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.loop-advanced-search-container .lia-entry__icon svg {
    width: 1.1rem;
    height: 1.1rem;
}

/* The dialog: a darkened, blurred overlay with one compact panel. Everything in
   the panel is sized here, not by the theme's heading and form rules, so it
   reads the same on every site; a theme restyles by targeting these classes. */
.lia-dialog {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 1rem;
}

.lia-dialog[hidden] {
    display: none;
}

.lia-dialog__overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 8, 8, 0.72);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.lia-dialog__panel {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: 30rem;
    max-height: calc(100vh - 2rem);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 2rem 1.75rem 1.5rem;
    border-radius: 14px;
    background: #fff;
    color: #1f1f1f;
    text-align: center;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

/* Nothing inside the panel may be wider than the panel: no horizontal scroller. */
.lia-dialog__panel * {
    box-sizing: border-box;
    max-width: 100%;
}

.lia-dialog__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 2.1rem;
    height: 2.1rem;
    padding: 0;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 50%;
    background: #fff;
    color: #1f1f1f;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}

.lia-dialog__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    background: #f4f4f4;
    color: var(--colour-primary, #2271b1);
    vertical-align: middle;
}

.lia-dialog__icon svg {
    width: 1.3rem;
    height: 1.3rem;
}

.lia-dialog__badge {
    display: inline-block;
    margin: 0 0 0 0.5rem;
    padding: 0.15rem 0.6rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 999px;
    font-size: 0.72rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    vertical-align: middle;
}

/* Two class names beat the theme's h2 and .single-area h2 sizing. */
.lia-dialog .lia-dialog__title {
    margin: 0.85rem 0 0.35rem;
    font-size: 1.4rem;
    line-height: 1.25;
    color: var(--colour-primary, #2271b1);
}

.lia-dialog .lia-dialog__intro {
    max-width: 26rem;
    margin: 0 auto 1rem;
    font-size: 0.95rem;
    line-height: 1.45;
    color: #444;
}

.lia-dialog .lia-dialog__form textarea {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-height: 5.5rem;
    margin: 0 0 0.75rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 10px;
    background: #fff;
    color: inherit;
    font: inherit;
    font-size: 1rem;
    line-height: 1.4;
    text-align: left;
    resize: vertical;
}

.lia-dialog .lia-dialog__form textarea:focus {
    outline: none;
    border-color: var(--colour-primary, #2271b1);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.lia-dialog .lia-dialog__submit {
    display: block;
    box-sizing: border-box;
    width: 100%;
    margin: 0;
}

.lia-dialog .lia-dialog__status {
    min-height: 1.3em;
    margin: 0.6rem 0 0;
    font-size: 0.9rem;
    color: #2f2f2f;
}

/* Phones: the panel sits at the bottom like a sheet, with tighter padding. */
@media (max-width: 600px) {
    .lia-dialog {
        align-items: flex-end;
        padding: 0.75rem;
    }

    .lia-dialog__panel {
        padding: 1.5rem 1.25rem 1.25rem;
    }

    .lia-dialog .lia-dialog__title {
        font-size: 1.25rem;
    }
}

body.lia-open {
    overflow: hidden;
}
