/* =============================================================
   Smart Pill Filters  —  smart-filters.css
   Card wrapper with shadow, religion pills (icon+text, tinted),
   language pills (lavender). All in one wrapping flex row.
   ============================================================= */

/* ── Outer section ─────────────────────────────────────────── */
.mi-smart-filters {
    padding: 0 0 4px;
}

/* ── White card with shadow ─────────────────────────────────── */
.mi-filters-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 2px 16px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.05);
    padding: 14px 16px 16px;
    margin: 0 2px;
}

/* ── Section heading ────────────────────────────────────────── */
.mi-filters-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 12px;
    letter-spacing: -0.1px;
    line-height: 1.3;
}

/* ── Combined pill row ──────────────────────────────────────── */
.mi-filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* ── Base pill ──────────────────────────────────────────────── */
.mi-fpill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 200px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: box-shadow .15s, background .15s, border-color .15s;
    font-family: inherit;
    border: 1.5px solid transparent;
    box-shadow: 0 1px 4px rgba(0,0,0,.07), 0 0 0 1px rgba(0,0,0,.04);
    box-sizing: border-box;
}

/* ── Religion pill: tinted bg, colored icon ─────────────────── */
.mi-fpill--religion {
    background: var(--pill-bg, #f5f5f5);
    color: var(--pill-ico, #333);
    border-color: transparent;
}

.mi-fpill--religion:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,.12);
    filter: brightness(.96);
}

.mi-fpill--religion.active {
    border-color: #FF7396;
    box-shadow: 0 0 0 2px rgba(255,115,150,.25);
}

/* Religion icon inside pill */
.mi-fpill__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: rgba(255,255,255,.7);
    flex-shrink: 0;
    font-size: 14px;
    line-height: 1;
}

/* Religion icons via data-slug ::before */
.mi-fpill__icon[data-slug="hindu"]::before     { content: "\0950"; font-family: serif; color: #E85D04; font-size: 17px; }
.mi-fpill__icon[data-slug="muslim"]::before    { content: "\262A"; color: #1A9E5A; font-size: 15px; }
.mi-fpill__icon[data-slug="sikh"]::before      { content: "\262C"; color: #1A9E5A; font-size: 14px; }
.mi-fpill__icon[data-slug="christian"]::before { content: "\271D"; color: #6C5CE7; font-size: 14px; }
.mi-fpill__icon[data-slug="jain"]::before      { content: "\2721"; color: #D4830A; font-size: 14px; }
.mi-fpill__icon[data-slug="buddhist"]::before  { content: "\2638"; color: #8E44AD; font-size: 14px; }

/* ── Language pill: lavender ────────────────────────────────── */
.mi-fpill--lang {
    background: #EDEAFF;
    color: #4a3d9a;
    border-color: #dcd8f5;
    box-shadow: 0 1px 4px rgba(74,61,154,.1), 0 0 0 1px rgba(74,61,154,.06);
}

.mi-fpill--lang:hover {
    background: #e0dbff;
    box-shadow: 0 2px 8px rgba(74,61,154,.18);
}

.mi-fpill--lang.active {
    background: #FF7396;
    color: #fff;
    border-color: #FF7396;
    box-shadow: 0 2px 10px rgba(255,115,150,.3);
}

/* ── More pill (language overflow) — pink outlined ─────────── */
.mi-fpill--more {
    background: transparent;
    color: #FF7396;
    border-color: #FF7396;
    box-shadow: 0 1px 4px rgba(255,115,150,.12);
}

.mi-fpill--more:hover {
    background: #fff0f4;
    box-shadow: 0 2px 8px rgba(255,115,150,.2);
}

/* ── More religion (religion overflow) ─────────────────────── */
.mi-fpill--more-rel {
    background: #f5f5f5;
    color: #555;
    border-color: #e8e8e8;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
}

.mi-fpill--more-rel:hover {
    background: #eee;
}

/* ── Clear pill ─────────────────────────────────────────────── */
.mi-fpill--clear {
    background: #fafafa;
    color: #999;
    border-color: #e8e8e8;
    font-weight: 600;
    box-shadow: none;
}

.mi-fpill--clear:hover {
    background: #ffe0e7;
    color: #FF7396;
    border-color: #FF7396;
}

/* ── Chevron icon ────────────────────────────────────────────── */
.mi-chevron {
    width: 10px;
    height: 10px;
    display: inline-block;
    vertical-align: middle;
    margin-top: -1px;
    color: currentColor;
    flex-shrink: 0;
}

/* =============================================================
   Bottom sheet modals
   ============================================================= */
.mi-filter-sheet {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 9001;
    background: #fff;
    border-radius: 22px 22px 0 0;
    padding: 12px 16px 32px;
    box-shadow: 0 -4px 32px rgba(0,0,0,.14);
    transform: translateY(100%);
    transition: transform .32s cubic-bezier(.33,1,.68,1);
    max-height: 80vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mi-filter-sheet.open {
    transform: translateY(0);
}

.mi-filter-sheet__handle {
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: #ddd;
    margin: 0 auto 4px;
    flex-shrink: 0;
}

.mi-filter-sheet__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.mi-filter-sheet__title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0;
}

.mi-filter-sheet__close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #888;
    padding: 0 4px;
    line-height: 1;
}

.mi-filter-sheet__body {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* ── Backdrop ────────────────────────────────────────────────── */
.mi-filter-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0,0,0,.38);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
}

.mi-filter-backdrop.visible {
    opacity: 1;
    pointer-events: auto;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (min-width: 768px) {
    .mi-filters-card {
        padding: 16px 20px 18px;
    }
    .mi-filters-title {
        font-size: 16px;
        text-align: center;
    }
    .mi-filters-row {
        justify-content: center;
    }
    .mi-fpill {
        font-size: 14px;
        padding: 8px 16px;
    }
}
