/* ==========================================================================
   taxi_syria 4.11 — «خريطتنا» (زر الطبقات + ورقة الاختيار) والرسائل الصوتية
   (CSS عادي خارج Tailwind؛ الألوان من متغيّرات --tsx-* مع احتياط)
   كل شي كبير وواضح بالأيقونات — للناس اللي ما بتقرا منيح.
   ========================================================================== */

.ts411-layers[hidden],
.ts411-layers-ctl[hidden],
.ts411-vbtn[hidden],
.ts411-vslot[hidden],
.ts411-live-voice[hidden],
.ts411-favv[hidden],
.ts411-rec [hidden] { display: none !important; }

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

/* زر «الطبقات» الدائري (عنصر تحكّم ليفلت، أو بقائمة أزرار خريطة الطلب) */
.ts411-layers {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--tsx-line, #dbe2e8);
    border-radius: 50%;
    background: var(--tsx-surface, #fff);
    color: var(--tsx-night, #0e2a3d);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
    cursor: pointer;
}
.ts411-layers:hover { background: var(--tsx-amber-wash, #fdf3dc); }
.ts411-layers:focus-visible { outline: 3px solid var(--tsx-amber, #c6952e); outline-offset: 2px; }
.ts411-layers-ctl { border: 0; background: none; box-shadow: none; }
.leaflet-control.ts411-layers-ctl { clear: both; }
.ts-mapbtn.ts411-layers { border-radius: 50%; }
/* 4.13: الغامق حسب الاختيار (data-theme) — مو حسب النظام بس، متل باقي الموقع */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .ts411-layers { color: var(--tsx-amber, #e1b558); }
}
:root[data-theme="dark"] .ts411-layers { color: var(--tsx-amber, #e1b558); }

/* حقوق OpenStreetMap: لازم تضل ظاهرة على كل خريطة (رخصة ODbL) */
.is-taxi-map .leaflet-control-attribution { display: block !important; }

/* ورقة الاختيار: خيارين كبار */
.ts411-mapopts { display: flex; flex-direction: column; gap: 10px; }
.ts411-mapopt {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--tsx-line, #dbe2e8);
    border-radius: 16px;
    background: var(--tsx-surface, #fff);
    color: var(--tsx-ink, #0c2233);
    text-align: start;
    cursor: pointer;
    font: inherit;
}
.ts411-mapopt:hover { background: var(--tsx-surface-alt, #f1f5f8); }
.ts411-mapopt.is-active {
    border-color: var(--tsx-amber, #c6952e);
    background: var(--tsx-amber-wash, #fdf3dc);
}
.ts411-mapopt__title { font-size: 1.15rem; font-weight: 800; line-height: 1.3; }
.ts411-mapopt__desc { font-size: .84rem; color: var(--tsx-ink-soft, #5b6472); line-height: 1.5; }
.ts411-mapopt__on {
    position: absolute;
    top: 10px;
    inset-inline-end: 12px;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--tsx-amber, #c6952e);
    color: #1d1405;
    font-size: .72rem;
    font-weight: 700;
}

/* ------------------------------------------------------------------ المشغّل */
.ts411-vp {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 6px 10px 6px 6px;
    border-radius: 999px;
    background: var(--tsx-surface-alt, #f1f5f8);
    border: 1px solid var(--tsx-line, #dbe2e8);
    color: var(--tsx-ink, #0c2233);
    vertical-align: middle;
}
[dir="rtl"] .ts411-vp { padding: 6px 6px 6px 10px; }
.ts411-vp__label {
    flex: 1 0 100%;
    padding-inline: 6px;
    font-size: .78rem;
    font-weight: 700;
    color: var(--tsx-amber-deep, #9a6e1e);
}
.ts411-vp__btn {
    display: grid;
    place-items: center;
    flex: none;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(150deg, #F6DF9A 0%, #C6952E 46%, #9A6E1E 100%);
    color: #1d1405;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
    cursor: pointer;
}
[dir="rtl"] .ts411-vp__btn svg { transform: scaleX(-1); }
.ts411-vp.is-playing .ts411-vp__btn svg { transform: none; }
.ts411-vp__btn:focus-visible { outline: 3px solid var(--tsx-night, #0e2a3d); outline-offset: 2px; }
.ts411-vp__bar {
    position: relative;
    flex: 1 1 60px;
    min-width: 50px;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--tsx-line, #dbe2e8);
}
.ts411-vp__bar i {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: 0;
    border-radius: inherit;
    background: var(--tsx-amber, #c6952e);
    transition: width .2s linear;
}
.ts411-vp__dur {
    flex: none;
    min-width: 2.6em;
    font-variant-numeric: tabular-nums;
    font-size: .84rem;
    font-weight: 700;
    direction: ltr;
}
.ts411-vp__del {
    display: grid;
    place-items: center;
    flex: none;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--tsx-line, #dbe2e8);
    border-radius: 50%;
    background: var(--tsx-surface, #fff);
    color: var(--tsx-danger, #dc2626);
    cursor: pointer;
}
.ts411-vp--big .ts411-vp__btn { width: 52px; height: 52px; }
.ts411-vp--big { padding-block: 8px; }
.ts411-vp--sm .ts411-vp__btn { width: 34px; height: 34px; }
.ts411-vp--sm .ts411-vp__btn svg { width: 18px; height: 18px; }
.ts411-vp--sm .ts411-vp__del { width: 32px; height: 32px; }
.ts411-vp--chat { background: transparent; border: 0; padding: 2px 0; min-width: 190px; }

/* ------------------------------------------------------------------ المسجّل */
.ts411-rec {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}
.ts411-rec__hint { margin: 0; font-size: .9rem; color: var(--tsx-ink-soft, #5b6472); line-height: 1.55; }
.ts411-rec__stage {
    position: relative;
    display: grid;
    place-items: center;
    width: 112px;
    height: 112px;
}
.ts411-rec__ring {
    --p: 0;
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(var(--tsx-danger, #dc2626) calc(var(--p) * 360deg), var(--tsx-line, #dbe2e8) 0);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 6px), #000 calc(100% - 5px));
}
.ts411-rec__mic,
.ts411-rec__stop {
    position: relative;
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
}
.ts411-rec__mic {
    background: linear-gradient(150deg, #F6DF9A 0%, #C6952E 46%, #9A6E1E 100%);
    color: #1d1405;
}
.ts411-rec__mic svg, .ts411-rec__stop svg { width: 40px; height: 40px; }
.ts411-rec__stop {
    background: var(--tsx-danger, #dc2626);
    color: #fff;
    animation: ts411-pulse 1.3s ease-in-out infinite;
}
.ts411-rec__mic:focus-visible, .ts411-rec__stop:focus-visible { outline: 4px solid var(--tsx-night, #0e2a3d); outline-offset: 3px; }
@keyframes ts411-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .45); }
    50% { box-shadow: 0 0 0 14px rgba(220, 38, 38, 0); }
}
.ts411-rec__wave {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 44px;
    direction: ltr;
}
.ts411-rec__wave i {
    display: block;
    width: 6px;
    height: 100%;
    border-radius: 3px;
    background: var(--tsx-amber, #c6952e);
    transform: scaleY(.08);
    transition: transform .08s linear;
}
.ts411-rec[data-mode="rec"] .ts411-rec__wave i { background: var(--tsx-danger, #dc2626); }
.ts411-rec__time { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.ts411-rec__time small { font-size: .9rem; font-weight: 600; color: var(--tsx-ink-soft, #5b6472); }
.ts411-rec__review { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; }
.ts411-rec__review-player { flex: 1 1 auto; min-width: 0; }
.ts411-rec__review-player .ts411-vp { width: 100%; }
.ts411-rec__del {
    display: grid;
    place-items: center;
    flex: none;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 1px solid var(--tsx-line, #dbe2e8);
    border-radius: 50%;
    background: var(--tsx-surface, #fff);
    color: var(--tsx-danger, #dc2626);
    cursor: pointer;
}
.ts411-rec__del svg { width: 24px; height: 24px; }
.ts411-rec__status { margin: 0; min-height: 1.4em; font-size: .92rem; font-weight: 600; line-height: 1.5; }
.ts411-rec__status.is-bad {
    padding: 8px 12px;
    border-radius: 10px;
    background: #fef2f2;
    color: #b91c1c;
}
.ts411-rec__max { margin: 0; font-size: .74rem; color: var(--tsx-ink-soft, #5b6472); }
.ts411-recmodal .ts-mbtn:disabled { opacity: .45; cursor: not-allowed; }

/* ------------------------------------------------------ «🎤 احكي وين أنت» */
.ts411-vrow { display: flex; flex-direction: column; gap: 8px; }
.ts411-vbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 50px;
    padding: 8px 16px;
    border: 2px dashed var(--tsx-amber, #c6952e);
    border-radius: 14px;
    background: var(--tsx-amber-wash, #fdf3dc);
    color: var(--tsx-ink, #0c2233);
    font: inherit;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
}
.ts411-vbtn:hover { filter: brightness(.98); }
.ts411-vbtn:focus-visible { outline: 3px solid var(--tsx-night, #0e2a3d); outline-offset: 2px; }
.ts411-vslot .ts411-vp,
.ts411-live-voice .ts411-vp { width: 100%; }
.ts411-live-voice { display: flex; flex-direction: column; gap: 6px; }
.ts411-busy { margin: 0; font-size: .86rem; color: var(--tsx-ink-soft, #5b6472); }

/* --------------------------------------------------- الأماكن المحفوظة */
.ts-place-item { flex-wrap: wrap; }
.ts411-favv {
    display: flex;
    flex: 1 0 100%;
    align-items: center;
    gap: 6px;
    padding-inline-start: 34px;
    padding-bottom: 4px;
}
.ts411-favv--home { padding-inline-start: 0; }
.ts411-favv .ts411-vp { flex: 1 1 auto; min-width: 0; }
.ts411-favv__rec {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: none;
    min-height: 36px;
    padding: 4px 10px;
    border: 1px solid var(--tsx-line, #dbe2e8);
    border-radius: 999px;
    background: var(--tsx-surface, #fff);
    color: var(--tsx-amber-deep, #9a6e1e);
    font: inherit;
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
}
.ts411-favv__rec svg { width: 20px; height: 20px; }

/* --------------------------------------------------------- لوحة السائق */
.ts411-drv-voice { margin: 8px 0 4px; }
.ts411-drv-voice .ts411-vp { width: 100%; background: var(--tsx-amber-wash, #fdf3dc); border-color: var(--tsx-amber, #c6952e); }
.ts-modal .ts411-drv-voice { text-align: start; }

/* --------------------------------------------------------- المحادثة */
.ts-rchat__mic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--tsx-line, #dbe2e8);
    border-radius: 50%;
    background: var(--tsx-surface, #fff);
    color: var(--tsx-amber-deep, #9a6e1e);
    cursor: pointer;
}
.ts-rchat__mic svg { width: 24px; height: 24px; }
.ts-rchat__mic:disabled { opacity: .45; cursor: not-allowed; }
.ts-rchat__msg.is-voice { min-width: 210px; }
.ts-rchat__msg.is-mine .ts411-vp__bar { background: rgba(42, 28, 5, .18); }
.ts-rchat__msg.is-mine .ts411-vp__bar i { background: #2a1c05; }
.ts-rchat__msg.is-mine .ts411-vp__btn { background: #2a1c05; color: #F6DF9A; }

@media (prefers-reduced-motion: reduce) {
    .ts411-rec__stop { animation: none; }
    .ts411-rec__wave i, .ts411-vp__bar i { transition: none; }
}

/* 4.13.3: نافذة الخريطة أبسط — خيارين جنب بعض، بنص قصير */
.ts411-mapopts.ts4133-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ts4133-pair .ts411-mapopt { align-items: center; justify-content: center; text-align: center; min-height: 56px; padding: 10px 8px; }
.ts4133-pair .ts411-mapopt__title { font-size: 1rem; }
