.communities .post-title.entry-title
{
	margin-bottom: 0;
}

.compare-checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.req-community:not(:last-child)
{
	margin-bottom: 1rem;
	text-align: center;
}

/* ============================================================
   COMPARE TRAY
   ============================================================ */

#compare-tray {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 -0.25rem 1rem rgba(0, 0, 0, 0.12);
    z-index: 9999;
    flex-direction: column;
    align-items: center;
}

#compare-tray-toggle {
    width: 100%;
    max-width: 1024px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: none;
    border-bottom: 1px solid #e0e0e0;
    padding: 0.375rem 1rem;
    cursor: pointer;
    font-size: 0.8125rem;
    color: #555;
    box-sizing: border-box;
}

#compare-tray-toggle:hover { background: #f5f5f5; }
#compare-tray-toggle > *   { flex-grow: 0; }

#compare-tray-count-label {
    font-size: 0.8125rem;
    color: #555;
    white-space: nowrap;
}

.toggle-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
    font-size: 1rem;
    line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
    .toggle-arrow { transition: none; }
}

#compare-tray.collapsed .toggle-arrow { transform: rotate(180deg); }

#compare-btn {
    background: #2c670d;
    color: #fff;
    border: none;
    border-radius: 0.25rem;
    padding: 0.375rem 1.125rem;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    display: inline-block;
}

#compare-btn:hover    { background: #2C670B; }
#compare-btn:disabled { background: #aaa; cursor: not-allowed; }

#compare-tray-body {
    width: 100%;
    max-width: 1024px;
    padding: 0.75rem 1.25rem 1rem;
    display: flex;
    align-items: stretch;
    box-sizing: border-box;
}

#compare-tray.collapsed #compare-tray-body { display: none; }

#compare-tray-items {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.compare-tray-item {
    width: calc(33.333% - 0.5rem);
    flex-shrink: 0;
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    padding: 0;
    background: #fafafa;
    box-sizing: border-box;
    overflow: hidden;
}

.compare-tray-item .item-image {
    flex-shrink: 0;
    width: 5rem;
    align-self: stretch;
    overflow: hidden;
    border: 0.25rem solid #C9C6AC;
}

.compare-tray-item .item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.compare-tray-item .item-body {
    flex: 1;
    min-width: 0;
    padding: 0.5rem 1.5rem 0.5rem 0.5rem;
}

.compare-tray-item .item-title {
    font-size: 1.25rem;
    line-height: 1.3;
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compare-tray-item .item-title a       { color: #2d670d; text-decoration: none; }
.compare-tray-item .item-title a:hover { text-decoration: underline; }

.compare-tray-item .item-location {
    display: block;
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.125rem;
}

.compare-tray-remove {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 1.375rem;
    height: 1.375rem;
    border-radius: 50%;
    border: 1px solid #999;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0.75rem;
    color: #555;
    line-height: 1;
    z-index: 2;
}

.compare-tray-remove:hover { background: #f0f0f0; border-color: #333; color: #333; }

.compare-tray-empty {
    width: calc(33.333% - 0.5rem);
    flex-shrink: 0;
    min-height: 3.625rem;
    border: 2px dashed #ccc;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 1.375rem;
    box-sizing: border-box;
}

/* ============================================================
   COMPARE PAGE
   ============================================================ */

.template-compare main { width: 100%; }

/* Remove the default right border that .content adds on this theme */
.template-compare .content {
    border-right: none;
    margin-right: 0;
}

/* ============================================================
   COMPARE TABLE WRAPPER
   ============================================================ */

/* Swipe hint: inserted before .compare-table-wrap by JS; visible only when
   the table overflows its container horizontally (controlled via JS). */
#compare-swipe-hint {
    background: #2c670d;
    color: #fff;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    letter-spacing: 0.02em;
}

.compare-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    padding-bottom: 0;
    box-sizing: border-box;
}

.compare-no-ids {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
    font-size: 1.05rem;
}

/* ============================================================
   COMPARE TABLE BASE
   ============================================================ */

.compare-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 0.9375rem;
    line-height: 1.45;
    color: #333;
    margin-bottom: 0;
}

/* Label column: fixed width for the field-name column on the far left */
.compare-label-th,
.compare-label-cell { width: 20%; }

/* Data column widths — remaining 80% split equally among communities */
.compare-table[data-cols="1"] .compare-community-cell,
.compare-table[data-cols="1"] .compare-data-cell   { width: 80%; }

.compare-table[data-cols="2"] .compare-community-cell,
.compare-table[data-cols="2"] .compare-data-cell   { width: 40%; }

.compare-table[data-cols="3"] .compare-community-cell,
.compare-table[data-cols="3"] .compare-data-cell   { width: 26.666%; }

/* ============================================================
   THEAD — default: normal table flow, no sticky/fixed positioning.
   JS applies position:fixed + .is-sticky when scrolled into range.
   ============================================================ */

.compare-table thead {
    z-index: 20;
}

/* Spacer row that holds thead's height when thead is position:fixed */
.compare-thead-spacer {
    visibility: hidden;
    pointer-events: none;
}

/* Once JS marks it fixed/sticky */
.compare-table thead.is-sticky {
    background: #fff;
}

/* ============================================================
   HEADER ROW th — default (not sticky): padding, white bg
   ============================================================ */

.compare-row--header {
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.10);
}

.compare-row--header th {
    padding: 1rem 0.75rem 0.875rem;
    vertical-align: bottom;
    border-bottom: 3px solid #2c670d;
    text-align: center;
    background: #fff;
}

/* ============================================================
   .compare-th-inner — the flex wrapper inside each <th>
   Default: column layout (image above, right panel below)
   ============================================================ */

.compare-th-inner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* Right panel: title + checkbox stacked vertically, centred */
.compare-th-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

/* ── Thumb link — default stacked layout ── */
/* aspect-ratio gives the link a definite height without touching the
   table-cell display.  The image is absolutely positioned so it fills
   the link even when the link grows beyond the aspect-ratio baseline. */
.compare-thumb-link {
    display: block;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 3px;
}

.compare-thumb-link img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    box-shadow: 0 1px 4px rgba(0,0,0,0.14);
}

.compare-no-image {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    color: #aaa;
    font-size: 0.8125rem;
    border-radius: 3px;
}

/* ── Title link — default stacked layout ── */
.compare-community-title {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: #2c670d;
    text-decoration: none;
    line-height: 1.3;
    text-align: center;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compare-community-title:hover { text-decoration: underline; color: #1e4a09; }

/* ============================================================
   IS-STICKY state
   JS adds .is-sticky to <thead>. Image left, right panel
   (title + Inquire) fills remainder.
   ============================================================ */

/* Sticky row: flex container so every th (including the empty label-th)
   honours its JS-applied style.width regardless of content.
   width:100% ensures the row never exceeds the thead's JS-set pixel width. */
.compare-table thead.is-sticky .compare-row--header {
    display: flex;
    align-items: stretch;
    width: 100%;
}

/* Each th becomes a flex item; flex-shrink:0 locks it to its measured width. */
.compare-table thead.is-sticky .compare-row--header th {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-sizing: border-box;
}

/* Restore padding for the label th in sticky mode (specificity 0,4,1 beats 0,3,1 above). */
.compare-table thead.is-sticky .compare-row--header th.compare-label-th {
    padding: 0.4rem 0.75rem;
}

/* Switch inner wrapper to horizontal flex */
.compare-table thead.is-sticky .compare-th-inner {
    flex-direction: row;
    align-items: stretch;
    height: 5.5rem;
}

/* Image panel — exact tray dimensions and border */
.compare-table thead.is-sticky .compare-thumb-link {
    flex: 0 0 5rem;
    height: 100%;
    margin-bottom: 0;
    border: 0.25rem solid #C9C6AC;
    box-sizing: border-box;
    overflow: hidden;
    border-radius: 0;
    aspect-ratio: auto;
}

.compare-table thead.is-sticky .compare-thumb-link img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    border-radius: 0;
    box-shadow: none;
}

.compare-table thead.is-sticky .compare-no-image {
    border-radius: 0;
}

/* Right panel fills remaining space */
.compare-table thead.is-sticky .compare-th-right {
    flex: 1;
    min-width: 0;
    align-items: flex-start;
    justify-content: center;
    padding: 0.25rem 0.5rem;
    gap: 0.2rem;
}

/* Title: left-aligned in sticky mode, fills right panel */
.compare-table thead.is-sticky .compare-community-title {
    display: block;
    text-align: left;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    padding: 0;
}

/* Inquire label: smaller, left-aligned, always visible in sticky mode */
.compare-table thead.is-sticky .compare-inquire-label {
    display: flex;
    justify-content: flex-start;
    font-size: 0.75rem;
    margin-top: 0;
}

/* ============================================================
   LABEL COLUMN CELLS
   ============================================================ */

/* Header cell above the label column.
   Higher specificity (.compare-row--header th has 0,1,1) so we need 0,2,1. */
.compare-row--header th.compare-label-th {
    color: #2c670d;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: left;
    padding: 0.4rem 0.75rem;
    vertical-align: middle;
}

/* Field label cells in data rows */
.compare-label-cell {
    background: #f4f9f1;
    color: #2c670d;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.4rem 0.75rem;
    border: none;
    border-right: 2px solid #2c670d;
    vertical-align: middle;
    text-align: left;
    /* Freeze on horizontal scroll */
    position: sticky;
    left: 0;
    z-index: 1;
}

/* Amenity label cell — lighter shade, indented */
.compare-label-cell--amenity {
    background: #eef7e8;
    color: #2c670d;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    padding: 0.3rem 0.75rem 0.3rem 1.25rem;
}

/* Label <th> in the header: freeze on horizontal scroll while the thead
   is in normal flow. Scoped to :not(.is-sticky) because when JS activates
   position:fixed on the thead the rule has no effect, but the explicit
   scope keeps intent clear and avoids any z-index conflicts. */
.compare-table thead:not(.is-sticky) th.compare-label-th {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
}

/* ============================================================
   DATA ROWS
   ============================================================ */

.compare-row--data td {
    padding: 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #e8e8e8;
}

.compare-row--data:nth-of-type(even) td { background: #f8f8f5; }
.compare-row--data:nth-of-type(odd)  td { background: #fff; }

.compare-data-cell { text-align: center; color: #333; }

.compare-data-cell--price {
    font-size: 1.125rem;
    font-weight: 700;
    color: #2c670d;
}

.compare-check {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    line-height: 1.5rem;
    text-align: center;
    border-radius: 50%;
    background: #2c670d;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
}

.compare-dash { color: #bbb; font-size: 1.25rem; }

/* ============================================================
   COMPARE TABLE — RESPONSIVE
   Breakpoints follow Enfold's built-in grid breakpoints.
   ============================================================ */

/* ── Tablet Landscape (768px – 989px) ── */
@media (max-width: 989px) {
    .compare-table {
        font-size: 0.875rem;
    }
    .compare-row--header th {
        padding: 0.75rem 0.5rem 0.625rem;
    }
    .compare-row--header th.compare-label-th {
        padding: 0.375rem 0.5rem;
    }
    .compare-table thead.is-sticky .compare-th-inner {
        height: 5rem;
    }
    .compare-community-title {
        font-size: 0.9375rem;
    }
    .compare-row--data td {
        padding: 0.625rem 0.5rem;
    }
    .compare-label-cell {
        padding: 0.375rem 0.5rem;
    }
    .compare-label-cell--amenity {
        padding: 0.25rem 0.5rem 0.25rem 1rem;
    }
}

/* ── Tablet Portrait (480px – 767px) ── */
@media (max-width: 767px) {
    /* Minimum width keeps columns legible; wrapper scrolls horizontally */
    .compare-table {
        font-size: 0.8125rem;
        min-width: 520px;
    }
    .compare-row--header th {
        padding: 0.625rem 0.375rem 0.5rem;
    }
    .compare-row--header th.compare-label-th {
        padding: 0.3rem 0.375rem;
    }
    .compare-table thead.is-sticky .compare-th-inner {
        height: 4.5rem;
    }
    .compare-table thead.is-sticky .compare-thumb-link {
        flex: 0 0 3.75rem;
    }
    .compare-community-title {
        font-size: 0.875rem;
    }
    .compare-row--data td {
        padding: 0.5rem 0.375rem;
    }
    .compare-label-cell {
        font-size: 0.6875rem;
        padding: 0.3rem 0.375rem;
    }
    .compare-label-cell--amenity {
        padding: 0.2rem 0.375rem 0.2rem 0.75rem;
    }
    .compare-data-cell--price {
        font-size: 1rem;
    }
    .compare-inquire-label {
        font-size: 0.8125rem;
    }
    #compare-inquire-row td {
        padding: 0.375rem 0.5rem 0.5rem;
    }
}

/* ── Smartphone (479px and below) ── */
@media (max-width: 479px) {
    .compare-table {
        font-size: 0.75rem;
        min-width: 460px;
    }
    .compare-row--header th {
        padding: 0.5rem 0.25rem 0.375rem;
    }
    .compare-row--header th.compare-label-th {
        padding: 0.25rem;
    }
    .compare-table thead.is-sticky .compare-th-inner {
        height: 4rem;
    }
    .compare-table thead.is-sticky .compare-thumb-link {
        flex: 0 0 3rem;
    }
    .compare-community-title {
        font-size: 0.8125rem;
    }
    .compare-check {
        width: 1.25rem;
        height: 1.25rem;
        line-height: 1.25rem;
        font-size: 0.75rem;
    }
    .compare-inquire-label {
        font-size: 0.75rem;
    }
    #compare-inquire-row td {
        padding: 0.3rem 0.25rem 0.375rem;
    }
}

/* ============================================================
   INQUIRE CHECKBOXES (in thead)
   ============================================================ */

.compare-inquire-label {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.4rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    user-select: none;
}

.compare-inquire-label input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: #2c670d;
    cursor: pointer;
    flex-shrink: 0;
}

/* ============================================================
   INQUIRE BUTTON ROW
   ============================================================ */

/* Advanced Search button hidden by default; shown via JS when 0 boxes checked */
.compare-advsearch-btn-link {
    display: none !important;
}

/* When JS shows the adv search button it sets display via inline style,
   which overrides this rule. Keep !important only on the default hidden state
   so the JS inline style (which has higher specificity) can override it.    */

/* Disabled state: gray background overrides Enfold's theme-color green. */
.compare-inquire-btn-link.is-disabled,
.compare-inquire-btn-link[aria-disabled="true"],
.compare-inquire-btn-link.is-disabled .avia-color-theme-color,
.compare-inquire-btn-link[aria-disabled="true"] .avia-color-theme-color,
a.compare-inquire-btn-link.is-disabled,
a.compare-inquire-btn-link[aria-disabled="true"] {
    background-color: #888 !important;
    background: #888 !important;
    border-color: #888 !important;
    pointer-events: none;
    cursor: not-allowed;
}

/* Button width driven only by padding, not full row width.
   Also remove any trailing right-padding Enfold adds after the label. */
.compare-row--inquire-btn .avia-button,
.compare-row--inquire-btn .compare-inquire-btn-link {
    display: inline-flex !important;
    width: auto !important;
}

/* Advanced Search: position='center' makes Enfold add avia-button-fullwidth.
   Override width only — display is controlled entirely by JS. */
.compare-row--inquire-btn .compare-advsearch-btn-link,
.compare-row--inquire-btn .compare-advsearch-btn-link.avia-button-fullwidth {
    width: auto !important;
}

.compare-row--inquire-btn .avia-button .avia-button-label,
.compare-row--inquire-btn .avia-button-label {
    padding-right: 0 !important;
}

/* ============================================================
   BUTTON ROW — JS toggles .is-btn-fixed on the <tr>.
   In fixed mode: display:block on <tr>, flex on <td>.
   In flow mode:  <tr> is display:table-row, <td> is display:table-cell
                  so colspan spans the full table width correctly.
   ============================================================ */

#compare-inquire-row {
    background: #fff;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.10);
}

/* Flow mode: table-cell so colspan works */
#compare-inquire-row td {
    border-top: 2px solid #2c670d;
    box-sizing: border-box;
    padding: 0.5rem 0.75rem 0.75rem;
    text-align: center;
}

/* Fixed mode: flex layout for hint + buttons stacked vertically */
#compare-inquire-row.is-btn-fixed td {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ↓ Scroll hint — hidden by JS once last data row is above button row */
#compare-scroll-hint {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #555;
    text-align: center;
    line-height: 1;
    letter-spacing: 0.04em;
}

/* Buttons sit side-by-side in their own row within the column layout */
#compare-inquire-row .compare-btn-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Invisible spacer that holds the button row's height in the table layout */
.compare-btnrow-spacer {
    visibility: hidden;
    pointer-events: none;
}

/* ============================================================
   COMPARE TRAY — RESPONSIVE
   Breakpoints follow Enfold's built-in grid breakpoints.
   ============================================================ */

/* ── Tablet Landscape (768px – 989px) ── */
@media (max-width: 989px) {
    .compare-tray-item .item-image {
        width: 4rem;
    }
    .compare-tray-item .item-title {
        font-size: 1.0625rem;
    }
}

/* ── Tablet Portrait (480px – 767px) ── */
@media (max-width: 767px) {
    #compare-tray-body {
        padding: 0.5rem 0.75rem 0.625rem;
    }
    #compare-tray-items {
        gap: 0.5rem;
    }
    .compare-tray-item {
        width: calc(33.333% - 0.375rem);
    }
    .compare-tray-item .item-image {
        width: 3rem;
        border-width: 0.1875rem;
    }
    .compare-tray-item .item-body {
        padding: 0.375rem 1.375rem 0.375rem 0.375rem;
    }
    .compare-tray-item .item-title {
        font-size: 0.875rem;
    }
    .compare-tray-item .item-location {
        font-size: 0.75rem;
    }
    .compare-tray-empty {
        width: calc(33.333% - 0.375rem);
        min-height: 2.75rem;
        font-size: 1.125rem;
    }
    #compare-tray-toggle {
        padding: 0.25rem 0.75rem;
    }
    #compare-tray-count-label {
        font-size: 0.75rem;
    }
    #compare-btn {
        font-size: 0.75rem;
        padding: 0.3rem 0.875rem;
    }
}

/* ── Smartphone (479px and below) ── */
@media (max-width: 479px) {
    #compare-tray-body {
        padding: 0.375rem 0.5rem 0.5rem;
    }
    #compare-tray-items {
        flex-direction: column;
        gap: 0.375rem;
    }
    .compare-tray-item,
    .compare-tray-empty {
        width: 100%;
        flex-shrink: 1;
    }
    .compare-tray-item .item-image {
        display: none;
    }
    .compare-tray-item .item-body {
        padding: 0.375rem 1.5rem 0.375rem 0.5rem;
    }
    .compare-tray-item .item-title {
        font-size: 0.875rem;
        white-space: normal;
    }
    .compare-tray-empty {
        min-height: 2.25rem;
        font-size: 1rem;
    }
}