/* =========================================================
   SIRAH PLACES MAP — V6
   خريطة معالم السيرة
   - نفس عرض ومسافات قسم الآيات تقريبًا
   - خلفية القسم بيضاء
   - عنوان أصغر وأكثر اتزانًا
   - دبوس تراثي نظيف بدون رمز داخلي
   - placeholder مناسب حسب نوع المعلم
   - بطاقات صغيرة وGrid بدون سحب أفقي
========================================================= */

.sirah-places {
    --sp-wine: #6f1d2f;
    --sp-wine-dark: #4b1420;
    --sp-gold: #b78338;
    --sp-gold-soft: #d9bc82;
    --sp-brown: #5b3822;
    --sp-ink: #35251d;
    --sp-muted: #806c5b;
    --sp-paper: #f3e5c9;
    --sp-paper-light: #fffaf0;
    --sp-line: rgba(145, 101, 51, .18);
    --sp-shadow: 0 14px 32px rgba(52, 34, 22, .10);

    position: relative;
    isolation: isolate;
    width: 100%;
    margin: 0;
    padding: clamp(22px, 2.6vw, 34px) 0;
    overflow: hidden;
    background: #fff;
}

.sirah-places *,
.sirah-places *::before,
.sirah-places *::after {
    box-sizing: border-box;
}

/* زخرفة خفيفة جدًا حتى تبقى الخلفية بيضاء */
.sirah-places::before,
.sirah-places::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 210px;
    aspect-ratio: 1;
    border-radius: 50%;
    pointer-events: none;
    opacity: .04;
    background:
        repeating-conic-gradient(
            from 45deg,
            rgba(154, 105, 45, .35) 0 2deg,
            transparent 2deg 14deg
        ),
        radial-gradient(
            circle,
            transparent 0 43%,
            rgba(154, 105, 45, .24) 44% 45%,
            transparent 46%
        );
}

.sirah-places::before {
    top: -115px;
    right: -85px;
}

.sirah-places::after {
    bottom: -120px;
    left: -90px;
}


/* =========================================================
   Container — مطابق تقريبًا لعرض قسم القرآن
========================================================= */

.sirah-places__container {
    position: relative;
    z-index: 1;
    width: min(
        calc(100% - var(--sirah-layout-gutter, 36px)),
        var(--sirah-layout-width, 1240px)
    ) !important;
    max-width: var(--sirah-layout-width, 1240px) !important;
    margin-inline: auto !important;
    padding-inline: 0 !important;
}


/* =========================================================
   العنوان — أصغر من النسخة السابقة
========================================================= */

.sirah-places__heading {
    width: min(100%, 720px);
    margin: 0 auto 15px;
    text-align: center;
}

.sirah-places__eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-bottom: 4px;
    color: #a97932;
    font-size: clamp(10px, .85vw, 13px);
    font-weight: 800;
}

.sirah-places__eyebrow i {
    color: #a97932;
    font-size: .95em;
}

.sirah-places__heading h2 {
    margin: 0;
    color: #673922;
    font-family: "Amiri", "Cairo", serif !important;
    font-size: clamp(26px, 2.2vw, 34px);
    font-weight: 700;
    line-height: 1.18;
}


/* =========================================================
   الإطار
========================================================= */

.sirah-places__workspace {
    position: relative;
    padding: 8px;
    overflow: hidden;
    border: 1px solid rgba(146, 99, 48, .17);
    border-radius: 22px;
    background:
        radial-gradient(
            circle at 50% -25%,
            rgba(255,255,255,.88),
            transparent 42%
        ),
        linear-gradient(
            180deg,
            #fffdf8 0%,
            #f7eedf 100%
        );
    box-shadow:
        var(--sp-shadow),
        inset 0 0 0 1px rgba(255,255,255,.72);
}

.sirah-places__workspace::before {
    content: "";
    position: absolute;
    inset: 4px;
    z-index: 0;
    border: 1px dashed rgba(177, 127, 60, .18);
    border-radius: 17px;
    pointer-events: none;
}

.sirah-places__workspace > * {
    position: relative;
    z-index: 2;
}


/* =========================================================
   زخرفة الزوايا
========================================================= */

.sirah-places__corner {
    position: absolute;
    z-index: 4;
    width: 26px;
    height: 26px;
    pointer-events: none;
    opacity: .50;
}

.sirah-places__corner::before,
.sirah-places__corner::after {
    content: "";
    position: absolute;
    background: #b68b4b;
}

.sirah-places__corner::before {
    width: 21px;
    height: 1px;
}

.sirah-places__corner::after {
    width: 1px;
    height: 21px;
}

.sirah-places__corner--tr {
    top: 1px;
    right: 1px;
}

.sirah-places__corner--tl {
    top: 1px;
    left: 1px;
    transform: scaleX(-1);
}

.sirah-places__corner--br {
    right: 1px;
    bottom: 1px;
    transform: scaleY(-1);
}

.sirah-places__corner--bl {
    left: 1px;
    bottom: 1px;
    transform: scale(-1);
}


/* =========================================================
   Toolbar + Custom Filters — موحد بدون أي Select افتراضي
========================================================= */

.sirah-places__toolbar {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 7px 9px;
    overflow: visible;
}

.sirah-places__toolbar-title {
    min-width: 0;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sirah-places__toolbar-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    color: #fcefd5;
    border: 2px solid #dec18b;
    border-radius: 50%;
    background:
        radial-gradient(
            circle at 35% 30%,
            #8b3949,
            var(--sp-wine) 58%,
            var(--sp-wine-dark)
        );
    box-shadow: 0 5px 12px rgba(87, 32, 42, .16);
    font-size: 11px;
}

.sirah-places__toolbar-title small {
    display: block;
    margin-bottom: 1px;
    color: #9b8068;
    font-size: 8px;
    font-weight: 700;
}

.sirah-places__toolbar-title strong {
    display: block;
    color: #4e3425;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.2;
}

.sirah-places__toolbar-filters {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    overflow: visible;
}

/* =========================================================
   Custom Select
========================================================= */

.sirah-places__custom-select {
    position: relative;
    z-index: 30;

    width: min(100%, 196px);
    min-width: 160px;

    overflow: visible;
}

.sirah-places__custom-select.is-open {
    z-index: 1200;
}

.sirah-places__custom-select-trigger {
    width: 100%;
    min-height: 47px;

    display: grid;
    grid-template-columns:
        30px
        minmax(0, 1fr)
        22px;

    align-items: center;

    gap: 7px;

    padding: 6px 7px;

    direction: rtl;

    color: #51382a;

    border:
        1px solid
        rgba(129, 88, 46, .16);

    border-radius: 12px;

    background:
        linear-gradient(
            180deg,
            rgba(255, 254, 250, .99),
            rgba(248, 239, 220, .98)
        );

    box-shadow:
        0 4px 11px rgba(61, 40, 26, .055),
        inset 0 0 0 1px rgba(255, 255, 255, .58);

    text-align: right;

    outline: 0;

    cursor: pointer;

    transition:
        border-color .16s ease,
        box-shadow .16s ease,
        background .16s ease;
}

.sirah-places__custom-select-trigger:hover,
.sirah-places__custom-select-trigger:focus-visible,
.sirah-places__custom-select.is-open .sirah-places__custom-select-trigger {
    border-color: rgba(111, 29, 47, .30);
    background:
        linear-gradient(
            180deg,
            #fffefb,
            #f7ead3
        );
    box-shadow:
        0 7px 15px rgba(61, 40, 26, .08),
        0 0 0 3px rgba(111, 29, 47, .045);
}

.sirah-places__custom-select-leading {
    width: 30px;
    height: 30px;

    display: grid;
    place-items: center;

    color: var(--sp-wine);

    border:
        1px solid
        rgba(111, 29, 47, .10);

    border-radius: 9px;

    background:
        linear-gradient(
            135deg,
            rgba(111, 29, 47, .055),
            rgba(183, 131, 56, .075)
        );

    font-size: 9px;
}

.sirah-places__custom-select-copy {
    min-width: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;

    gap: 2px;

    text-align: right;
}

.sirah-places__custom-select-copy small {
    display: block;

    width: 100%;

    margin: 0;

    color: #a18a75;

    font-size: 6.8px;
    font-weight: 800;
    line-height: 1.1;

    text-align: right;
}

.sirah-places__custom-select-copy strong {
    display: block;

    width: 100%;
    min-width: 0;

    overflow: hidden;

    color: #52382a;

    font-size: 9.6px;
    font-weight: 900;
    line-height: 1.25;

    text-align: right;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.sirah-places__custom-select-arrow {
    width: 20px;
    height: 20px;

    display: grid;
    place-items: center;

    align-self: center;

    color: #9c784b;

    border-radius: 50%;

    background:
        rgba(183, 131, 56, .08);

    font-size: 6px;

    transition:
        transform .18s ease,
        color .18s ease,
        background .18s ease;
}

.sirah-places__custom-select.is-open .sirah-places__custom-select-arrow {
    color: #fff;
    background: var(--sp-wine);
    transform: rotate(180deg);
}

.sirah-places__custom-select-menu {
    position: absolute;

    top: calc(100% + 6px);
    right: 0;
    left: 0;

    z-index: 1300;

    width: 100%;
    min-width: 100%;
    max-width: 100%;
    max-height: 245px;

    padding: 5px;

    overflow-x: hidden;
    overflow-y: auto;

    direction: rtl;

    border:
        1px solid
        rgba(126, 84, 43, .16);

    border-radius: 13px;

    background:
        linear-gradient(
            180deg,
            rgba(255, 254, 250, .995),
            rgba(250, 241, 224, .995)
        );

    box-shadow:
        0 16px 32px rgba(56, 36, 23, .17),
        inset 0 0 0 1px rgba(255, 255, 255, .58);

    backdrop-filter: blur(10px);

    scrollbar-width: thin;
    scrollbar-color:
        rgba(111, 29, 47, .30)
        transparent;
}

.sirah-places__custom-select-menu[hidden] {
    display: none !important;
}

.sirah-places__custom-select-menu::-webkit-scrollbar {
    width: 5px;
}

.sirah-places__custom-select-menu::-webkit-scrollbar-track {
    background: transparent;
}

.sirah-places__custom-select-menu::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(111, 29, 47, .26);
}

.sirah-places__custom-select-option {
    width: 100%;
    min-height: 34px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 20px;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    direction: rtl;
    color: #614737;
    border: 0;
    border-radius: 9px;
    background: transparent;
    text-align: right;
    outline: 0;
    cursor: pointer;
    transition:
        color .14s ease,
        background .14s ease,
        transform .14s ease;
}

.sirah-places__custom-select-option + .sirah-places__custom-select-option {
    margin-top: 2px;
}

.sirah-places__custom-select-option span {
    min-width: 0;
    overflow: hidden;
    font-size: 9.5px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sirah-places__custom-select-option i {
    display: none;
    color: var(--sp-wine);
    font-size: 7px;
}

.sirah-places__custom-select-option:hover,
.sirah-places__custom-select-option:focus-visible {
    color: var(--sp-wine-dark);
    background: rgba(183, 131, 56, .105);
}

.sirah-places__custom-select-option.is-selected {
    color: var(--sp-wine-dark);
    background:
        linear-gradient(
            90deg,
            rgba(111, 29, 47, .07),
            rgba(183, 131, 56, .11)
        );
    font-weight: 900;
}

.sirah-places__custom-select-option.is-selected i {
    display: block;
}

/* =========================================================
   Toolbar Actions
========================================================= */

.sirah-places__toolbar-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sirah-places__tool-btn {
    min-height: 33px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 10px;
    color: var(--sp-wine);
    border: 1px solid rgba(111, 29, 47, .13);
    border-radius: 999px;
    background: rgba(255, 251, 242, .95);
    box-shadow: 0 4px 10px rgba(63, 41, 27, .05);
    font-size: 10px;
    font-weight: 800;
    outline: 0;
    cursor: pointer;
    transition: .16s ease;
}

.sirah-places__tool-btn:hover,
.sirah-places__tool-btn:focus-visible {
    color: #fff;
    border-color: var(--sp-wine);
    background: var(--sp-wine);
    box-shadow: 0 7px 14px rgba(111, 29, 47, .15);
}

.sirah-places__tool-btn:disabled {
    opacity: .48;
    cursor: not-allowed;
}

.sirah-places__tool-btn.is-loading {
    opacity: .70;
    pointer-events: none;
}

/* =========================================================
   الخريطة
========================================================= */

.sirah-places__map-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(126, 88, 49, .10);
    border-radius: 17px;
    background: #e9dfcc;
    box-shadow: inset 0 0 20px rgba(74, 48, 28, .04);
}

.sirah-places__map {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 390px;
    background: #e9dfcc;
}

/*
 * فلتر أثري خفيف.
 * خفيف عمدًا حتى تبقى أسماء الشوارع واضحة.
 */
.sirah-places__map .leaflet-tile-pane {
    filter:
        sepia(.25)
        saturate(.84)
        contrast(.97)
        brightness(1.045);
}

.sirah-places__paper-overlay {
    position: absolute;
    inset: 0;
    z-index: 400;
    pointer-events: none;
    background:
        radial-gradient(
            circle at center,
            transparent 64%,
            rgba(65, 41, 24, .055) 100%
        ),
        linear-gradient(
            90deg,
            rgba(188, 145, 79, .015),
            transparent 30%,
            transparent 70%,
            rgba(188, 145, 79, .015)
        );
    mix-blend-mode: multiply;
}


/* =========================================================
   بوصلة
========================================================= */

.sirah-places__compass {
    position: absolute;
    left: 14px;
    bottom: 16px;
    z-index: 650;
    width: 49px;
    height: 49px;
    display: grid;
    place-items: center;
    color: var(--sp-wine);
    border: 1px solid rgba(112, 76, 40, .20);
    border-radius: 50%;
    background:
        radial-gradient(
            circle,
            rgba(255,250,239,.96) 0 53%,
            rgba(218,190,140,.92) 54% 57%,
            rgba(255,250,239,.96) 58%
        );
    box-shadow: 0 6px 16px rgba(54, 37, 25, .13);
    pointer-events: none;
    font-size: 13px;
    opacity: .90;
}

.sirah-places__compass i {
    transform: rotate(-45deg);
}

.sirah-places__compass-north {
    position: absolute;
    top: 3px;
    color: var(--sp-wine-dark);
    font-size: 7px;
    font-weight: 900;
}


/* =========================================================
   Notice
========================================================= */

.sirah-places__notice {
    position: absolute;
    z-index: 800;
    top: 12px;
    right: 50%;
    max-width: min(88%, 440px);
    transform: translateX(50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 12px;
    color: #5c442d;
    border: 1px solid rgba(157, 112, 57, .19);
    border-radius: 999px;
    background: rgba(255, 250, 238, .96);
    box-shadow: 0 8px 20px rgba(55, 35, 22, .12);
    backdrop-filter: blur(7px);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.45;
}

.sirah-places__notice[hidden] {
    display: none !important;
}

.sirah-places__notice.is-success {
    color: #35633f;
}

.sirah-places__notice.is-error {
    color: #8b2538;
}

.sirah-places__notice.is-info {
    color: #705127;
}


/* =========================================================
   Marker — نظيف، بلا رمز داخلي
========================================================= */

.sirah-heritage-marker {
    background: transparent !important;
    border: 0 !important;
}

.sirah-heritage-marker__wrap {
    position: relative;
    width: 40px;
    height: 48px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.sirah-heritage-marker__pin {
    position: relative;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 2px solid #f0d8a8;
    border-radius: 50% 50% 50% 9px;
    background:
        radial-gradient(
            circle at 34% 30%,
            #9b4658,
            var(--sp-wine) 58%,
            var(--sp-wine-dark)
        );
    box-shadow:
        0 7px 13px rgba(79, 31, 39, .24),
        inset 0 0 0 1px rgba(255,255,255,.12);
    transform: rotate(-45deg);
    transition: .18s ease;
}

.sirah-heritage-marker__pin::before {
    content: "";
    width: 10px;
    height: 10px;
    border: 2px solid rgba(255, 247, 227, .98);
    border-radius: 50%;
    background: #d2a85f;
    box-shadow:
        0 0 0 2px rgba(255, 247, 227, .22),
        inset 0 0 0 1px rgba(122, 79, 30, .18);
}

.sirah-heritage-marker.is-active .sirah-heritage-marker__pin,
.sirah-heritage-marker:hover .sirah-heritage-marker__pin {
    transform: rotate(-45deg) scale(1.08);
    box-shadow:
        0 10px 18px rgba(79, 31, 39, .28),
        0 0 0 5px rgba(183, 131, 56, .10);
}


/* =========================================================
   اسم المعلم — قريب من الدبوس
========================================================= */

.sirah-place-name-tooltip {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.sirah-place-name-tooltip::before {
    display: none !important;
}

.sirah-place-name-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 190px;
    padding: 5px 9px;
    overflow: hidden;
    color: #422c21;
    border: 1px solid rgba(151, 105, 55, .30);
    border-radius: 999px;
    background:
        linear-gradient(
            180deg,
            rgba(255,252,245,.98),
            rgba(246,233,208,.98)
        );
    box-shadow:
        0 4px 10px rgba(59, 39, 26, .10),
        inset 0 0 0 1px rgba(255,255,255,.62);
    font-size: 10.5px;
    font-weight: 900;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sirah-place-name-label::before {
    content: "";
    width: 5px;
    height: 5px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--sp-wine);
    box-shadow: 0 0 0 2px rgba(111, 29, 47, .09);
}


/* =========================================================
   Popup
========================================================= */

.sirah-places__map .leaflet-popup-content-wrapper {
    overflow: hidden;
    padding: 0;
    border: 1px solid rgba(149, 101, 49, .18);
    border-radius: 17px;
    background: #fffaf0;
    box-shadow: 0 16px 36px rgba(57, 37, 24, .18);
}

.sirah-places__map .leaflet-popup-content {
    width: 265px !important;
    margin: 0;
}

.sirah-places__map .leaflet-popup-tip {
    background: #fffaf0;
}

.sirah-places__map .leaflet-popup-close-button {
    top: 7px !important;
    left: 7px !important;
    right: auto !important;
    z-index: 5;
    width: 27px !important;
    height: 27px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    border-radius: 50%;
    background: rgba(76, 19, 32, .88) !important;
    font-size: 16px !important;
    line-height: 1 !important;
}

.sirah-place-popup {
    overflow: hidden;
    direction: rtl;
    text-align: right;
    background: #fffaf0;
}

.sirah-place-popup__media {
    position: relative;
    height: 140px;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 50% 35%,
            rgba(255,255,255,.48),
            transparent 28%
        ),
        linear-gradient(
            135deg,
            #ead6b4,
            #f5e8ce
        );
}

.sirah-place-popup__media::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(
            to top,
            rgba(53, 32, 19, .20),
            transparent 48%
        );
}

.sirah-place-popup__image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.sirah-place-popup__placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: #9a6d34;
    font-size: 31px;
}

.sirah-place-popup__placeholder--fallback {
    display: none;
}

.sirah-place-popup__body {
    padding: 13px 15px 15px;
}

.sirah-place-popup__kicker {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
    color: #a57535;
    font-size: 9px;
    font-weight: 800;
}

.sirah-place-popup__title {
    margin: 0 0 7px;
    color: var(--sp-wine-dark);
    font-family: "Amiri", "Cairo", serif !important;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
}

.sirah-place-popup__desc {
    margin: 0;
    color: #746150;
    font-size: 11px;
    line-height: 1.8;
}

.sirah-place-popup__actions {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(145, 106, 67, .12);
}

.sirah-place-popup__link {
    min-height: 33px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 11px;
    color: #fff !important;
    border-radius: 999px;
    background:
        linear-gradient(
            135deg,
            var(--sp-wine),
            var(--sp-wine-dark)
        );
    box-shadow: 0 6px 14px rgba(111, 29, 47, .14);
    text-decoration: none !important;
    font-size: 10px;
    font-weight: 800;
}


/* =========================================================
   بطاقات المعالم — صف واحد فقط + Scroll أفقي
========================================================= */

.sirah-places__grid {
    position: relative;

    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;

    width: 100% !important;
    max-width: 100% !important;

    gap: 6px !important;

    margin-top: 7px;
    padding: 2px 1px 7px;

    overflow-x: auto !important;
    overflow-y: hidden !important;

    direction: rtl;

    scroll-behavior: smooth;
    scroll-snap-type: x proximity;

    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;

    scrollbar-width: thin;
    scrollbar-color:
        rgba(111, 29, 47, .28)
        rgba(183, 131, 56, .07);
}


/* Chrome / Edge */
.sirah-places__grid::-webkit-scrollbar {
    height: 5px;
}

.sirah-places__grid::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(183, 131, 56, .07);
}

.sirah-places__grid::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background:
        linear-gradient(
            90deg,
            rgba(183, 131, 56, .48),
            rgba(111, 29, 47, .45)
        );
}


/* =========================================================
   البطاقة
========================================================= */

.sirah-place-mini-card {
    flex: 0 0 145px !important;

    width: 145px !important;
    min-width: 145px !important;
    max-width: 145px !important;

    min-height: 52px;

    display: grid !important;

    grid-template-columns:
        39px
        minmax(0, 1fr)
        20px !important;

    align-items: center;

    gap: 6px;
    padding: 5px;

    direction: rtl;

    color: inherit;

    border: 1px solid rgba(131, 90, 48, .13);
    border-radius: 11px;

    background:
        linear-gradient(
            180deg,
            rgba(255,253,247,.98),
            rgba(247,237,218,.96)
        );

    box-shadow:
        0 3px 8px
        rgba(56, 37, 24, .035);

    text-align: right;

    outline: 0;
    cursor: pointer;

    scroll-snap-align: start;

    transition:
        transform .16s ease,
        border-color .16s ease,
        box-shadow .16s ease,
        background .16s ease;
}


.sirah-place-mini-card:hover,
.sirah-place-mini-card:focus-visible,
.sirah-place-mini-card.is-active {
    transform: translateY(-1px);

    border-color:
        rgba(111, 29, 47, .25);

    box-shadow:
        0 6px 13px
        rgba(57, 37, 24, .08);
}


.sirah-place-mini-card.is-active {
    background:
        linear-gradient(
            180deg,
            #fffaf0,
            #f1deb9
        );
}


.sirah-place-mini-card__media {
    width: 39px;
    height: 39px;

    overflow: hidden;

    border:
        1px solid
        rgba(132, 91, 48, .11);

    border-radius: 8px;

    background: #ead9bd;
}


.sirah-place-mini-card__media img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform .18s ease;
}


.sirah-place-mini-card:hover
.sirah-place-mini-card__media img {
    transform: scale(1.05);
}


.sirah-place-mini-card__placeholder {
    width: 100%;
    height: 100%;

    display: grid;
    place-items: center;

    color: #986b34;

    background:
        radial-gradient(
            circle at 50% 36%,
            rgba(255,255,255,.52),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #ead5af,
            #f6e8cf
        );

    font-size: 15px;
}


.sirah-place-mini-card__placeholder--image-fallback {
    display: none;
}


.sirah-place-mini-card__copy {
    min-width: 0;
}


.sirah-place-mini-card__copy small {
    display: block;

    margin-bottom: 1px;

    overflow: hidden;

    color: #a08972;

    font-size: 6.8px;
    font-weight: 700;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.sirah-place-mini-card__copy strong {
    display: block;

    overflow: hidden;

    color: #4a3226;

    font-size: 10px;
    font-weight: 900;

    line-height: 1.3;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.sirah-place-mini-card__arrow {
    width: 20px;
    height: 20px;

    display: grid;
    place-items: center;

    color: var(--sp-wine);

    border-radius: 50%;

    background:
        rgba(111, 29, 47, .055);

    font-size: 6px;

    transition:
        .16s ease;
}


.sirah-place-mini-card:hover
.sirah-place-mini-card__arrow,
.sirah-place-mini-card.is-active
.sirah-place-mini-card__arrow {
    color: #fff;
    background: var(--sp-wine);
}


/*
|--------------------------------------------------------------------------
| لا يوجد عرض المزيد ولا صف ثانٍ.
|--------------------------------------------------------------------------
*/

.sirah-places__more-wrap,
.sirah-places__more-btn {
    display: none !important;
}



/* =========================================================
   موقع المستخدم
========================================================= */

.sirah-user-marker {
    position: relative;
    background: transparent !important;
    border: 0 !important;
}

.sirah-user-marker__pulse {
    position: absolute;
    inset: 1px;
    border-radius: 50%;
    background: rgba(111, 29, 47, .20);
    animation: sirahUserPulse 1.8s infinite;
}

.sirah-user-marker__dot {
    position: absolute;
    inset: 6px;
    display: grid;
    place-items: center;
    color: #fff;
    border: 2px solid #fff0d4;
    border-radius: 50%;
    background:
        linear-gradient(
            135deg,
            #9a4657,
            var(--sp-wine)
        );
    box-shadow: 0 4px 12px rgba(76, 19, 32, .28);
    font-size: 7px;
}

@keyframes sirahUserPulse {
    0% {
        opacity: .9;
        transform: scale(.85);
    }

    70%,
    100% {
        opacity: 0;
        transform: scale(1.65);
    }
}

.sirah-user-popup {
    min-width: 130px;
    padding: 3px;
    text-align: center;
}

.sirah-user-popup strong {
    display: block;
    color: var(--sp-wine-dark);
    font-size: 12px;
}

.sirah-user-popup small {
    display: block;
    margin-top: 3px;
    color: #806c5b;
    font-size: 8px;
}


/* =========================================================
   Leaflet controls
========================================================= */

.sirah-places__map .leaflet-control-zoom {
    overflow: hidden;
    border: 1px solid rgba(116, 80, 48, .12);
    border-radius: 10px;
    box-shadow: 0 7px 16px rgba(63, 42, 29, .11);
}

.sirah-places__map .leaflet-control-zoom a {
    width: 31px;
    height: 31px;
    color: var(--sp-wine);
    background: rgba(255, 250, 240, .96);
    line-height: 31px;
}

.sirah-places__map .leaflet-control-attribution {
    padding: 2px 6px;
    color: #7b6d61;
    background: rgba(255, 250, 240, .78);
    font-size: 8px;
}


/* =========================================================
   Empty state
========================================================= */

.sirah-places__empty {
    position: absolute;
    inset: 0;
    z-index: 700;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 5px;
    padding: 22px;
    color: #72502f;
    text-align: center;
    background:
        radial-gradient(
            circle at 50% 34%,
            rgba(255,255,255,.76),
            transparent 27%
        ),
        linear-gradient(
            135deg,
            #f0e3ca,
            #fbf5e9
        );
}

.sirah-places__empty[hidden] {
    display: none !important;
}

.sirah-places__empty-icon {
    width: 49px;
    height: 49px;
    display: grid;
    place-items: center;
    margin-bottom: 4px;
    color: #9b6e34;
    border: 1px solid rgba(173, 123, 55, .20);
    border-radius: 50%;
    background: #fff8e8;
    font-size: 17px;
}

.sirah-places__empty h3 {
    margin: 0;
    color: #553724;
    font-family: "Amiri", "Cairo", serif !important;
    font-size: 17px;
}

.sirah-places__empty p {
    margin: 0;
    color: #846f5c;
    font-size: 9px;
}


/* =========================================================
   Responsive
========================================================= */

@media (max-width: 991px) {
    .sirah-places__map {
        height: 350px;
    }

    .sirah-places__compass {
        display: none;
    }

}

@media (max-width: 767px) {
    .sirah-places {
        padding: 18px 0;
    }

    .sirah-places__heading {
        margin-bottom: 11px;
    }

    .sirah-places__heading h2 {
        font-size: 27px;
    }

    .sirah-places__workspace {
        padding: 6px;
        border-radius: 17px;
    }

    .sirah-places__workspace::before {
        inset: 3px;
        border-radius: 13px;
    }

    .sirah-places__toolbar {
        min-height: 43px;
        padding: 4px 5px 6px;
    }

    .sirah-places__toolbar-icon {
        width: 31px;
        height: 31px;
        flex-basis: 31px;
    }

    .sirah-places__tool-btn {
        width: 32px;
        height: 32px;
        min-height: 32px;
        padding: 0;
    }

    .sirah-places__tool-btn span {
        display: none;
    }

    .sirah-places__map-shell {
        border-radius: 13px;
    }

    .sirah-places__map {
        height: 315px;
    }

    .sirah-place-name-label {
        max-width: 145px;
        padding: 5px 8px;
        font-size: 9px;
    }


    .sirah-place-mini-card {
        min-height: 49px;
        grid-template-columns:
            37px
            minmax(0, 1fr);
        gap: 6px;
        padding: 5px;
    }

    .sirah-place-mini-card__media {
        width: 37px;
        height: 37px;
    }

    .sirah-place-mini-card__arrow {
        display: none;
    }

    .sirah-places__notice {
        top: 8px;
        max-width: 92%;
        padding: 7px 10px;
        font-size: 9px;
    }
}

/* =========================================================
   Responsive — القوائم المخصصة
========================================================= */

@media (max-width: 991px) {
    .sirah-places__toolbar {
        flex-wrap: wrap;
        overflow: visible;
    }

    .sirah-places__toolbar-title {
        flex: 1 1 auto;
    }

    .sirah-places__toolbar-filters {
        order: 3;
        flex: 1 0 100%;
        width: 100%;
        justify-content: stretch;
        overflow: visible;
    }

    .sirah-places__custom-select {
        flex: 1 1 0;
        width: auto;
        max-width: none;
        min-width: 0;
    }
}

@media (max-width: 767px) {
    .sirah-places__toolbar {
        min-height: 0;
        gap: 6px;
        padding: 4px 5px 7px;
    }

    .sirah-places__toolbar-filters {
        gap: 5px;
    }

    .sirah-places__custom-select-trigger {
        min-height: 38px;
        grid-template-columns: 27px minmax(0, 1fr) 19px;
        padding: 4px 5px;
        border-radius: 10px;
    }

    .sirah-places__custom-select-leading {
        width: 27px;
        height: 27px;
        border-radius: 8px;
    }

    .sirah-places__custom-select-copy small {
        font-size: 6.3px;
    }

    .sirah-places__custom-select-copy strong {
        font-size: 8.8px;
    }

    .sirah-places__custom-select-menu {
        max-height: 220px;
        border-radius: 11px;
    }

    .sirah-places__custom-select-option {
        min-height: 33px;
        padding: 6px 8px;
    }

    .sirah-places__custom-select-option span {
        font-size: 9px;
    }
}


@media (max-width: 767px) {
    .sirah-places__custom-select {
        min-width: 0;
    }

    .sirah-places__custom-select-trigger {
        min-height: 45px;

        grid-template-columns:
            28px
            minmax(0, 1fr)
            20px;

        gap: 6px;

        padding: 5px 6px;
    }

    .sirah-places__custom-select-leading {
        width: 28px;
        height: 28px;
    }

    .sirah-places__custom-select-copy small {
        font-size: 6.6px;
    }

    .sirah-places__custom-select-copy strong {
        font-size: 9px;
    }
}

@media (max-width: 420px) {
    .sirah-places__map {
        height: 292px;
    }

    .sirah-place-mini-card__copy strong {
        font-size: 9.5px;
    }

    .sirah-place-mini-card__copy small {
        font-size: 6.5px;
    }

    .sirah-places__map .leaflet-popup-content {
        width: 235px !important;
    }

    .sirah-place-popup__media {
        height: 125px;
    }
}


/* =========================================================
   FINAL GUARANTEE — الكروت صف واحد فقط في كل الأجهزة
========================================================= */

.sirah-places .sirah-places__grid {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;

    grid-template-columns: none !important;

    overflow-x: auto !important;
    overflow-y: hidden !important;
}


.sirah-places .sirah-place-mini-card {
    flex-shrink: 0 !important;
}


@media (max-width: 991px) {

    .sirah-places .sirah-place-mini-card {
        flex-basis: 140px !important;

        width: 140px !important;
        min-width: 140px !important;
        max-width: 140px !important;
    }
}


@media (max-width: 767px) {

    .sirah-places .sirah-places__grid {
        display: flex !important;
        flex-wrap: nowrap !important;

        gap: 5px !important;

        overflow-x: auto !important;
        overflow-y: hidden !important;
    }


    .sirah-places .sirah-place-mini-card {
        flex: 0 0 132px !important;

        width: 132px !important;
        min-width: 132px !important;
        max-width: 132px !important;

        grid-template-columns:
            36px
            minmax(0, 1fr) !important;

        min-height: 48px;

        gap: 5px;
        padding: 5px;
    }


    .sirah-places .sirah-place-mini-card__media {
        width: 36px;
        height: 36px;
    }


    .sirah-places .sirah-place-mini-card__arrow {
        display: none !important;
    }
}

.sirah-place-mini-card[hidden] {
    display: none !important;
}
/* =========================================================
   FIX — القوائم المخصصة فوق الخريطة
   يمنع Leaflet من تغطية القائمة المنسدلة
========================================================= */

.sirah-places__workspace {
    overflow: visible !important;
}

.sirah-places__toolbar {
    position: relative !important;
    z-index: 1200 !important;
    overflow: visible !important;
}

.sirah-places__toolbar-filters {
    position: relative !important;
    z-index: 1300 !important;
    overflow: visible !important;
}

.sirah-places__custom-select {
    position: relative !important;
    z-index: 1 !important;
    overflow: visible !important;
}

.sirah-places__custom-select.is-open {
    z-index: 1600 !important;
}

.sirah-places__custom-select-menu {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    right: 0 !important;
    left: auto !important;
    z-index: 9999 !important;
}

.sirah-places__map-shell {
    position: relative !important;
    z-index: 1 !important;
}

.sirah-places__workspace > .sirah-places__toolbar {
    z-index: 1200 !important;
}

.sirah-places__workspace > .sirah-places__map-shell {
    z-index: 1 !important;
}

/*
 * نحصر طبقات Leaflet داخل الخريطة فقط
 * حتى لا تتجاوز الـToolbar والقائمة المنسدلة.
 */
.sirah-places__map .leaflet-pane {
    z-index: 1 !important;
}

.sirah-places__map .leaflet-tile-pane {
    z-index: 1 !important;
}

.sirah-places__map .leaflet-overlay-pane {
    z-index: 2 !important;
}

.sirah-places__map .leaflet-shadow-pane {
    z-index: 3 !important;
}

.sirah-places__map .leaflet-marker-pane {
    z-index: 4 !important;
}

.sirah-places__map .leaflet-tooltip-pane {
    z-index: 5 !important;
}

.sirah-places__map .leaflet-popup-pane {
    z-index: 6 !important;
}

.sirah-places__map .leaflet-control-container {
    position: relative;
    z-index: 7 !important;
}

@media (max-width: 991px) {
    .sirah-places__toolbar,
    .sirah-places__toolbar-filters,
    .sirah-places__custom-select {
        overflow: visible !important;
    }
}
