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

.ts412-offline__go[hidden],
.ts412-ed [hidden] { display: none !important; }

/* الضغطة المطوّلة على الخريطة: لا قائمة نسخ/تحديد نص بالجوال */
#ts-map.leaflet-container {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* ------------------------------------------------------------ الدبوس */
.ts412-pin {
    position: relative;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    margin: 0 auto;
    border: 3px solid #fff;
    border-radius: 50% 50% 50% 4px;
    background: var(--pin, #dc2626);
    box-shadow: 0 3px 8px rgba(0, 0, 0, .35);
    transform: rotate(-45deg);
    cursor: pointer;
}
.ts412-pin__emoji {
    display: block;
    transform: rotate(45deg);
    font-size: 19px;
    line-height: 1;
}

/* ------------------------------------------------------------ النافذة على الدبوس */
.ts412-popup .leaflet-popup-content { margin: 12px 14px; }
.ts412-pop { display: flex; flex-direction: column; gap: 10px; font: inherit; }
.ts412-pop__head { display: flex; align-items: center; gap: 10px; }
.ts412-pop__ico {
    flex: none;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--pin, #dc2626);
    border: 3px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
    font-size: 22px;
}
.ts412-pop__label { font-size: 1.1rem; line-height: 1.3; word-break: break-word; }
.ts412-pop__note {
    margin: 0;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--tsx-surface-alt, #f1f5f8);
    font-size: .95rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}
.ts412-pop__acts { display: flex; flex-direction: column; gap: 8px; }

.ts412-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 48px;
    padding: 8px 12px;
    border: 2px solid var(--tsx-line, #dbe2e8);
    border-radius: 14px;
    background: var(--tsx-surface, #fff);
    color: var(--tsx-ink, #0c2233);
    font: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
}
.ts412-btn:hover { background: var(--tsx-surface-alt, #f1f5f8); }
.ts412-btn:focus-visible { outline: 3px solid var(--tsx-amber, #c6952e); outline-offset: 2px; }
.ts412-btn--go {
    border-color: var(--tsx-amber, #c6952e);
    background: linear-gradient(150deg, #F6DF9A 0%, #E1B558 46%, #C6952E 100%);
    color: #1d1405;
    font-size: 1.15rem;
}
.ts412-btn--go:hover { filter: brightness(1.04); background: linear-gradient(150deg, #F6DF9A 0%, #E1B558 46%, #C6952E 100%); }
.ts412-btn--danger { border-color: #fecaca; color: #b91c1c; }
.ts412-btn--danger:hover { background: #fef2f2; }

/* ------------------------------------------------------------ ورقة الإضافة/التعديل */
.ts412-edmodal .ts-modal__card { max-height: 92vh; overflow-y: auto; }
.ts412-ed { display: flex; flex-direction: column; gap: 14px; text-align: start; }
.ts412-ed__sec { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.ts412-ed__h { font-size: 1rem; font-weight: 800; color: var(--tsx-ink, #0c2233); }
.ts412-ed__input { width: 100%; min-height: 48px; font-size: 1.05rem; box-sizing: border-box; }
.ts412-ed__note { min-height: 84px; resize: vertical; line-height: 1.5; }
.ts412-ed__hint { color: var(--tsx-ink-soft, #5b6472); font-size: .85rem; }

.ts412-kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ts412-kind {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-height: 74px;
    padding: 8px 4px;
    border: 2px solid var(--tsx-line, #dbe2e8);
    border-radius: 16px;
    background: var(--tsx-surface, #fff);
    color: var(--tsx-ink, #0c2233);
    font: inherit;
    cursor: pointer;
}
.ts412-kind__emoji { font-size: 30px; line-height: 1; }
.ts412-kind__txt { font-size: .85rem; font-weight: 700; }
.ts412-kind.is-on {
    border-color: var(--tsx-amber, #c6952e);
    background: var(--tsx-amber-wash, #fdf3dc);
    box-shadow: 0 0 0 2px var(--tsx-amber, #c6952e) inset;
}

.ts412-colors { display: flex; flex-wrap: wrap; gap: 10px; }
.ts412-sw {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 3px solid #fff;
    border-radius: 50%;
    background: var(--pin, #dc2626);
    box-shadow: 0 0 0 2px var(--tsx-line, #dbe2e8);
    color: #fff;
    font-size: 20px;
    font-weight: 900;
    cursor: pointer;
}
.ts412-sw--auto { font-size: 20px; }
.ts412-sw.is-on { box-shadow: 0 0 0 3px var(--tsx-ink, #0c2233); }

.ts412-ed__voice { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ts412-mic {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 52px;
    padding: 8px 16px;
    border: 2px solid var(--tsx-amber, #c6952e);
    border-radius: 999px;
    background: var(--tsx-amber-wash, #fdf3dc);
    color: var(--tsx-night, #0e2a3d);
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

/* ------------------------------------------------------------ ورقة الطبقات */
.ts412-part { margin-top: 12px; }
.ts412-mymap .ts412-mymap__state {
    margin-top: 4px;
    padding: 3px 12px;
    border-radius: 999px;
    background: var(--tsx-surface-alt, #f1f5f8);
    font-size: .9rem;
    font-weight: 800;
}
.ts412-mymap.is-active .ts412-mymap__state { background: var(--tsx-amber, #c6952e); color: #1d1405; }
.ts412-hint {
    margin: 8px 2px 0;
    color: var(--tsx-ink-soft, #5b6472);
    font-size: .9rem;
    line-height: 1.5;
}

.ts412-offline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    margin-top: 12px;
    padding: 12px 14px;
    border: 2px dashed var(--tsx-line, #dbe2e8);
    border-radius: 16px;
    background: var(--tsx-surface-alt, #f1f5f8);
    text-align: start;
}
.ts412-offline__txt { font-size: 1rem; font-weight: 700; line-height: 1.4; color: var(--tsx-ink, #0c2233); }
.ts412-offline__go {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--tsx-night, #0e2a3d);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}
.ts412-offline__go:hover { filter: brightness(1.15); }

/* ------------------------------------------------------------ الأماكن المحفوظة: الملاحظة */
.ts-place-item__text .ts412-note {
    display: block;
    white-space: normal;
    overflow-wrap: anywhere;
    opacity: .9;
}

/* 4.13: الغامق حسب الاختيار (data-theme) — مو حسب النظام بس، متل باقي الموقع */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .ts412-offline__go { background: var(--tsx-amber, #e1b558); color: #1d1405; }
}
:root[data-theme="dark"] .ts412-offline__go { background: var(--tsx-amber, #e1b558); color: #1d1405; }
