/*
Theme Name:   Listeo ChildTheme
Theme URI: http://listeo.pro
Author: Purethemes
Author URI: http://themeforest.net/user/purethemes
Description: Directory WordPress Theme by Purethemes
Version: 1.0
License: ThemeForest
License URI: http://themeforest.net/licenses
Text Domain: listeo
Domain Path: /languages/
Tags: light, responsive-layout, post-formats, theme-options, translation-ready, two-columns
Template: listeo
*/

/* ===========================================
   eNAILS.GR - LISTING CARD FIXES v2
   Fix: tags overflow photo, content z-index,
        half-card text bleed over map image
   =========================================== */

/* 1. Photo container - fixed height + clip overflow */
.listing-item-grid .item-photo,
.listing-item-half .item-photo,
.list-layout .item-photo {
    position: relative;
    overflow: hidden;
    min-height: 200px;
}

/* 2. Force photo link to fill container cleanly */
.listing-item-grid .item-photo a.listing-photo-cont,
.listing-item-half .item-photo a.listing-photo-cont {
    display: block;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    background: #f0f0f0;
}

/* 3. Category tag badges - keep inside photo, no overflow */
.listing-item-grid .item-photo .listing-item-tags,
.listing-item-half .item-photo .listing-item-tags {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    max-width: calc(100% - 50px);
    overflow: hidden;
    max-height: 32px;
}

/* 4. Fix half-card layout: prevent content bleeding over photo */
.listing-item-half {
    overflow: hidden;
    position: relative;
}

.listing-item-half .listing-item-content {
    position: relative;
    z-index: 2;
    background: #fff;
    overflow: hidden;
}

/* 5. Half-card: ensure photo column and content column don't overlap */
.listing-item-half .item-photo {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

/* 6. Truncate long text in listing cards to prevent overflow */
.listing-item-half .listing-item-content .listing-item-meta span,
.listing-item-half .listing-item-content .listing-open-status,
.listing-item-grid .listing-item-content .listing-item-meta span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: inline-block;
}

/* 7. Keep custom field rows from overflowing */
.listing-item-half .listing-item-content .listing-item-custom-fields,
.listing-item-grid .listing-item-content .listing-item-custom-fields {
    overflow: hidden;
    max-height: 120px;
}

/* 8. Fix checkmark rows text overflow */
.listing-item-half .listing-item-content .checkmark-list li,
.listing-item-grid .listing-item-content .checkmark-list li {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}