/* ==========================================================================
   [omnicasa_property_data] — Frontend property info grid
   ========================================================================== */

.oc-property-data-wrap {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

@media (max-width: 640px) {
    .oc-property-data-wrap {
        gap: 20px;
    }
}

.oc-property-data {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 40px;
    font-size: 15px;
    line-height: 1.5;
    color: #1a1a1a;
}

@media (max-width: 1024px) {
    .oc-property-data {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .oc-property-data {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Column */
.oc-property-data__col {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Section */
.oc-property-data__section {
    display: flex;
    flex-direction: column;
}

/* .oc-property-data__section:not(:last-child) {
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
} */

/* Section title */
.oc-property-data__title {
    margin: 0 0 12px;
    padding: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

/* Definition list reset */
.oc-property-data__list {
    margin: 0;
    padding: 0;
}

/* ----------------------------------------------------------------
 * [omnicasa_project_properties] — linked-properties table on project pages.
 * Wrapper handles horizontal overflow on small screens; the table itself
 * collapses into stacked rows below 600px so each property reads as a card.
 * ---------------------------------------------------------------- */

.oc-project-properties-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.oc-project-properties {
    width: 100%;
    /* `separate` (with zero spacing) is required for `border-radius` to be
       honored on the table — `collapse` ignores it entirely. */
    border-collapse: separate;
    border-spacing: 0;
    font-size: 15px;
    font-weight: normal;
    line-height: 1.4;
    /* Frame all four sides. The `tr:last-child td` rule below strips that
       row's `border-bottom`, so the bottom edge is the table's own border
       and never doubles up. `!important` is needed because Elementor's
       theme/widget CSS targets generic `table` selectors. */
    border: 1px solid #eee !important;
    border-radius: 5px;
    overflow: hidden;
}

/* Corner cells get matching rounding so their own background/border doesn't
   poke past the table's rounded frame. Targets the four corners specifically
   (top-left/right via thead first-/last-child th, bottom-left/right via the
   last row's first-/last-child td). */
.oc-project-properties thead tr:first-child th:first-child {
    border-top-left-radius: 5px;
}
.oc-project-properties thead tr:first-child th:last-child {
    border-top-right-radius: 5px;
}
.oc-project-properties tbody tr:last-child td:first-child {
    border-bottom-left-radius: 5px;
}
.oc-project-properties tbody tr:last-child td:last-child {
    border-bottom-right-radius: 5px;
}

.oc-project-properties a,
.oc-project-properties td,
.oc-project-properties th {
    color: inherit !important;
    text-decoration: none;
}
.oc-project-properties a:hover {
    text-decoration: underline;
}

.oc-project-properties__th,
.oc-project-properties__td {
    padding: 12px 14px;
    text-align: left;
    vertical-align: middle;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 1px solid #eee !important;
}

.oc-project-properties__th {
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #555;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
}

.oc-project-properties tbody tr:last-child .oc-project-properties__td {
    border-bottom: none !important;
}

/* Price column right-aligned to keep digits readable. */
.oc-project-properties__th--price,
.oc-project-properties__td--price {
    text-align: right;
    white-space: nowrap;
}

/* --- Mobile: stack each row as a card --- */
@media (max-width: 600px) {
    .oc-project-properties-wrap {
        overflow-x: visible;
    }
    .oc-project-properties,
    .oc-project-properties thead,
    .oc-project-properties tbody,
    .oc-project-properties tr,
    .oc-project-properties th,
    .oc-project-properties td {
        display: block;
        width: 100%;
    }
    /* Hide the header row visually but keep it for screen readers. */
    .oc-project-properties thead {
        position: absolute;
        left: -9999px;
        top: -9999px;
    }
    .oc-project-properties tbody tr {
        margin-bottom: 12px;
        padding: 0;
        border: none !important;
        border-radius: 0;
        background: transparent;
    }
    .oc-project-properties__td {
        padding: 10px !important;
        border-bottom: 1px solid #eee !important;
        /* `!important` on display because Elementor / theme CSS resets `td`
           back to `table-cell`, which would un-flex the label/value pair. */
        display: flex !important;
        justify-content: space-between;
        align-items: baseline;
        gap: 10px;
        text-align: left;
    }
    .oc-project-properties__td:last-child {
        border-bottom: none !important;
    }
    /* Inject the column header on the left of each row via the data-label
       attribute. The value text falls to the right via space-between. */
    .oc-project-properties__td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 13px;
        color: #555;
        text-align: left;
        flex: 0 0 auto;
        margin-right: auto;
    }
    /* Stretch price to its own line so currency stays readable. */
    .oc-project-properties__td--price {
        font-weight: 600;
    }
}

/* Row: label + value side by side */
.oc-property-data__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.oc-property-data__row:last-child {
    border-bottom: none;
}

.oc-property-data__row dt {
    margin: 0;
    font-weight: 400;
    color: #333;
    flex-shrink: 0;
}

.oc-property-data__row dd {
    margin: 0;
    font-weight: 400;
    color: #1a1a1a;
    text-align: right;
    word-break: break-word;
}

/* Price per-month suffix */
.oc-price-suffix {
    font-size: 70%;
}

/* ==========================================================================
   [omnicasa_documents] — Downloadable documents grid
   ========================================================================== */

.oc-documents-wrap {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

@media (max-width: 640px) {
    .oc-documents-wrap {
        gap: 20px;
    }
}

.oc-documents {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 1024px) {
    .oc-documents {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .oc-documents {
        grid-template-columns: 1fr;
    }
}

.oc-documents__item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    border: 1px solid #1a1a1a;
    border-radius: 6px;
    text-decoration: none;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    transition: background-color 0.15s ease, border-color 0.15s ease;
    gap: 10px;
}

.oc-documents__item:before {
    content: "\ea96";
    font-family: 'icomoon-tabler' !important;
    speak: never;
    font-size: 1.125rem;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
}

.oc-documents__item:hover {
    background-color: #f5f5f5;
    border-color: #333;
    color: #1a1a1a;
    text-decoration: none;
}

/* ==========================================================================
   [omnicasa_property_fields] — Inline field icons row
   ========================================================================== */

.oc-property-fields {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    align-items: center;
    white-space: nowrap;
}

.oc-property-fields__item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.oc-property-fields__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.oc-property-fields__icon--surface_total::before {
    content: "\f7a0";
}

.oc-property-fields__icon--surface_living::before {
    content: "\f7a0";
}

.oc-property-fields__icon--surface_ground::before {
    content: "\eecf";
}

.oc-property-fields__icon--bedrooms::before {
    content: "\fca1";
    font-size: 1.35rem;
}

.oc-property-fields__icon--bathrooms::before {
    content: "\ef48";
}

.oc-property-fields__icon::before {
    display: inline-block;
    font-family: 'icomoon-tabler' !important;
    speak: never;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
}

@media (max-width: 767px) {
    .oc-property-fields {
        gap: 10px;
    }
}
