/* ==========================================================================
   Property Custom Tags Styling
   ========================================================================== */
.property-tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #eef2ff;
    color: #4f46e5;
    border: 1px solid #c7d2fe;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.property-tag-badge:hover {
    background: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
}

.property-tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
}

.property-tag-chip .remove-tag-btn {
    cursor: pointer;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1;
    transition: color 0.15s ease;
}

.property-tag-chip .remove-tag-btn:hover {
    color: #ef4444;
}

.tags-cloud-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.global-category-block {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.global-category-block:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(99, 102, 241, 0.2);
}

.global-category-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-color);
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.global-tag-card-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.global-tag-card-chip:hover {
    border-color: var(--accent-color);
    background: #f5f3ff;
    color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(99, 102, 241, 0.15);
}

.global-tag-card-chip .tag-count-badge {
    background: #e2e8f0;
    color: #475569;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 700;
}

.global-tag-delete-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    margin-left: 2px;
    color: #94a3b8;
    font-size: 10px;
    transition: all 0.15s ease;
}

.global-tag-delete-icon:hover {
    background: #fee2e2;
    color: #ef4444;
}

.preview-tag-editor-box {
    margin-top: 12px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

/* ------------------------------------------------------------------ *
 *  Grid card tag cloud — clamped to two rows
 *
 *  Amenity tags run to a dozen or more on prime listings, which pushed the
 *  footer down and made cards in the same row wildly different heights. Two
 *  rows is enough to convey the flavour; the complete set is in the View
 *  Details modal, whose #modal-tags-list is deliberately NOT clamped.
 *
 *  The badges wrap, so the height has to be pinned per row: height is fixed on
 *  the badge and the container allows exactly two of them plus one gap.
 * ------------------------------------------------------------------ */
.tags-cloud-container.card-tags-clamped {
    --tag-row-height: 21px;
    --tag-row-gap: 6px;
    max-height: calc(var(--tag-row-height) * 2 + var(--tag-row-gap));
    overflow: hidden;
}

.tags-cloud-container.card-tags-clamped .property-tag-badge {
    height: var(--tag-row-height);
    box-sizing: border-box;
}
