/* style.css */

/* تنظیمات کلی صفحه */
html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Segoe UI', 'Tahoma', 'Helvetica Neue', sans-serif;
    overflow: hidden;
}

/* کانتینر نقشه */
#map {
    width: 100%;
    height: calc(100% - 60px);
    z-index: 1;
}

/* ===== هدر سایت ===== */
.site-header {
    width: 100%;
    height: 60px;
    background: linear-gradient(to left, #0077b6, #0096c7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1000;
    direction: rtl;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-content i {
    font-size: 24px;
}

.header-content h1 {
    font-size: 18px;
    margin: 0;
    font-weight: 600;
}

/* ===== استایل دکمه‌های داخل پاپ‌آپ ===== */
.custom-popup .leaflet-popup-content-wrapper {
    border-radius: 12px;
    text-align: center;
    padding: 5px;
}

.popup-content h3 {
    margin: 0 0 5px 0;
    color: #0077b6;
    font-size: 16px;
}

.popup-content p {
    margin: 5px 0 15px 0;
    font-size: 13px;
    color: #555;
}

/* دکمه مسیریابی (آبی) */
.navigate-btn {
    display: block;
    width: 100%;
    padding: 10px 0;
    background-color: #00b4d8;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 14px;
    transition: background 0.3s;
    margin-top: 5px;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
}

.navigate-btn:hover {
    background-color: #0077b6;
    color: white;
}

/* دکمه ارسال/اشتراک‌گذاری (سبز) - جدید */
.share-btn {
    display: block;
    width: 100%;
    padding: 10px 0;
    background-color: #2a9d8f;
    /* سبز */
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 14px;
    transition: background 0.3s;
    margin-top: 8px;
    border: none;
    cursor: pointer;
    font-family: inherit;
    /* برای ارث‌بری فونت فارسی */

    /* در فایل style.css */
    -webkit-appearance: none;
    /* برای سافاری و آیفون */
    -moz-appearance: none;
    appearance: none;
    border: none;
    /* برای اطمینان */

}

.share-btn:hover {
    background-color: #21867a;
}

.navigate-btn i,
.share-btn i {
    margin-left: 5px;
}

/* استایل آیکون مارکرها */
/* ده هزار لیتری */

.water-icon {
    text-align: center;
    line-height: 32px;
    color: white;
    background: #044eb6;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);

}

/* پنج هزار لیتری */

.water-icon-5k {
    text-align: center;
    line-height: 32px;
    color: white;
    background: #4fa8ff;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}



/* مارکر مدرسه (آبی با آیکون مدرسه) */
.school-icon {
    width: 32px;
    height: 32px;
    background: #e3970a;
    border-radius: 50%;
    color: white;
    line-height: 32px;
    text-align: center;
    border: 2px solid white;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}


/*legend*/
#legend {
    position: fixed;
    bottom: 15px;
    right: 15px;
    background: white;
    padding: 10px 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    font-size: 14px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.legend-item:last-child {
    margin-bottom: 0;
}





/*icon legend*/

#legend .water-icon,
#legend .water-icon-5k {
    width: 22px;
    height: 22px;
    line-height: 22px;
    font-size: 14px;
    margin-left: 8px;
}



/*delecte liflet logo*/
.leaflet-control-attribution {
    display: none !important;
}



/* ===== اضافه کردن به انتهای style.css ===== */

/* --- استایل دکمه موقعیت و سوییچ --- */

/* دکمه دایره‌ای (موقعیت یاب) */
/* دکمه دایره‌ای (موقعیت یاب) با رنگ جدید */
/* دکمه دایره‌ای (موقعیت یاب) - رنگ نارنجی جذاب */
.custom-control-btn {
    position: absolute;
    background-color: #ff5722;
    /* نارنجی (ست شده با مارکر لوکیشن) */
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    /* سایه کمی بیشتر برای برجستگی */
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    /* آیکون سفید */
    transition: all 0.2s ease;
    /* انیمیشن نرم */
    border: 2px solid white;
    /* حاشیه سفید برای تمیزی */
}

/* حالت کلیک شده */
.custom-control-btn:active {
    background-color: #e64a19;
    /* نارنجی تیره‌تر هنگام کلیک */
    transform: translateX(-50%) scale(0.95);
    /* افکت کوچک شدن موقع کلیک */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* موقعیت پایین-وسط برای دکمه لوکیشن */
.bottom-center {
    bottom: 80px;
    /* بالاتر از لجند */
    left: 50%;
    transform: translateX(-50%);
}

/* کانتینر سوییچ نقشه */
.map-toggle-wrapper {
    position: absolute;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 10px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* موقعیت بالا-راست برای سوییچ */
.top-right {
    top: 70px;
    /* زیر هدر */
    right: 10px;
}

.toggle-label {
    font-size: 12px;
    font-weight: bold;
    color: #333;
}

/* استایل ظاهری سوییچ (Switch) */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #2196F3;
}

input:checked+.slider:before {
    transform: translateX(20px);
}

/* جابجایی دکمه‌های زوم (تا زیر سوییچ نیفتند) */
.leaflet-bottom.leaflet-left {
    bottom: 20px;
    left: 10px;
}

/* --- استایل کلاسترها --- */

/* حذف حاشیه پیش‌فرض کلاستر */
.marker-cluster-custom {
    background: none !important;
    border: none !important;
}

/* نگهدارنده آیکون کلاستر */
.cluster-wrapper {
    position: relative;
    width: 32px;
    height: 32px;
}

/* دایره قرمز کوچک برای نمایش تعداد */
.cluster-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: red;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    line-height: 18px;
    text-align: center;
    border: 1px solid white;
}


/* --- استایل دکمه پشتیبانی تلگرام --- */

/* مکان: بالا سمت چپ */
.top-left {
    top: 70px; /* فاصله از هدر (هم‌تراز با دکمه سوییچ) */
    left: 10px;
}

.support-btn {
    position: absolute;
    z-index: 1000;
    width: 40px;
    height: 40px;
    background-color: #24A1DE; /* رنگ اصلی تلگرام */
    color: white;
    border-radius: 50%; /* دایره‌ای */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    text-decoration: none; /* حذف خط زیر لینک */
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    border: 2px solid white;
    transition: transform 0.2s, background-color 0.2s;
}

/* افکت هاور (موس روی دکمه) */
.support-btn:hover {
    background-color: #208bc0;
    transform: scale(1.1); /* کمی بزرگ‌تر شود */
}

/* افکت کلیک */
.support-btn:active {
    transform: scale(0.95);
}