/* ============================================================
   cf-wc-events-list — Widget liste d'événements WooCommerce
   ============================================================ */

.cf-wc-events-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    font-family: 'Cabin', sans-serif;
}

/* ── Toolbar ─────────────────────────────────────────────────── */
.cf-wc-events-list__toolbar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Search */
.cf-wc-events-list__search-wrap {
    position: relative;
    width: 100%;
}

.cf-wc-events-list__search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    pointer-events: none;
}

.cf-wc-events-list__search {
    width: 100%;
    height: 48px;
    padding: 0 16px 0 48px;
    border: 1px solid #cfd0d3;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    color: #161a2d;
    background: #ffffff;
    outline: none;
    transition: border-color 0.15s ease;
    appearance: none;
    -webkit-appearance: none;
}

.cf-wc-events-list__search::placeholder {
    color: #696b72;
}

.cf-wc-events-list__search:focus {
    border-color: #fd1555;
}

/* Toolbar bottom row: chips + count */
.cf-wc-events-list__toolbar-bottom {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
}

.cf-wc-events-list__toolbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

/* ── Sort select ─────────────────────────────────────────────── */
.cf-wc-events-list__sort {
    height: 36px;
    padding: 0 36px 0 14px;
    border: 1.5px solid #cfd0d3;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    color: #696b72;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23696B72' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    transition: border-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.cf-wc-events-list__sort:focus,
.cf-wc-events-list__sort:hover {
    border-color: #fd1555;
    color: #161a2d;
}

/* ── Chips ───────────────────────────────────────────────────── */
.cf-wc-events-list__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.cf-wc-events-list__chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 45px;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    background: #f5f5f5;
    color: #161a2d;
    font-family: Cabin, sans-serif;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: normal;
    line-height: 21px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
}

.cf-wc-events-list__chip:hover {
    border-color: #fd1555;
    color: #fd1555;
}

.cf-wc-events-list__chip--active {
    background-color: #fd1555;
    border-color: #fd1555;
    color: #ffffff;
}

/* ── Compteur ────────────────────────────────────────────────── */
.cf-wc-events-list__count {
    font-size: 0.875rem;
    color: #696b72;
    margin: 0;
    white-space: nowrap;
    flex-shrink: 0;
}

.cf-wc-events-list__count-value {
    font-weight: 700;
    color: #161a2d;
}

/* ── Grille d'items (alignée sur Elementor Loop Grid) ────────── */
.cf-wc-events-list__grid {
    display: grid;
    grid-template-columns: repeat(var(--grid-columns, 3), minmax(0, 1fr));
    column-gap: var(--grid-column-gap, 24px);
    row-gap: var(--grid-row-gap, 24px);
}

/* Masonry (équivalent .elementor-posts-masonry) */
.cf-wc-events-list__grid.elementor-posts-masonry {
    align-items: flex-start;
}

.cf-wc-events-list__grid:not(.elementor-posts-masonry) {
    align-items: stretch;
}

.cf-wc-events-list__item {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* ── Carte de repli (fallback sans template Elementor) ───────── */
.cf-wc-events-list__item-fallback {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #cfd0d3;
    border-radius: 16px;
    overflow: hidden;
    height: 100%;
    transition: box-shadow 0.2s ease;
}

.cf-wc-events-list__item-fallback:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.cf-wc-events-list__item-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.cf-wc-events-list__item-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    flex: 1;
}

.cf-wc-events-list__item-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cf-wc-events-list__item-cat {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: #ebe2f3;
    color: #161a2d;
    font-size: 0.75rem;
    font-weight: 600;
}

.cf-wc-events-list__item-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #161a2d;
    margin: 0;
    line-height: 1.3;
}

.cf-wc-events-list__item-price {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: #ebe2f3;
    color: #161a2d;
    font-size: 0.875rem;
    font-weight: 600;
    align-self: flex-start;
}

.cf-wc-events-list__item-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    margin: 0 20px 20px;
    border-radius: 12px;
    background: #fd1555;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.cf-wc-events-list__item-btn:hover {
    background: #e00f49;
    color: #ffffff;
}

/* ── État vide ───────────────────────────────────────────────── */
.cf-wc-events-list__empty {
    color: #696b72;
    font-size: 0.9375rem;
    margin: 0;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 640px) {
    .cf-wc-events-list__toolbar-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .cf-wc-events-list__toolbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .cf-wc-events-list__sort {
        flex: 1;
        max-width: 200px;
    }
}

/* ── Editor placeholder (mode édition Elementor) ─────────────── */
.cf-wc-events-list__editor-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 20px 12px;
    background: #f0f2f5;
    border: 1px dashed #b5b5b5;
    border-radius: 8px;
    text-align: center;
    min-height: 80px;
}

.cf-wc-events-list__editor-placeholder-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
}

.cf-wc-events-list__editor-placeholder-tpl {
    font-size: 0.75rem;
    color: #888;
}
