/* ==========================================================
   Radar & Forecast Maps Styles
   This file contains all CSS related to the Radar and Forecast Maps view,
   extracted from styleforecast.css for better modularity.
   ========================================================== */

/* IMPORTANT: This file assumes that global CSS variables (like --theme-bg-body,
   --theme-accent-primary-medium, etc.) are defined in a base CSS file
   (e.g., main.css or global.css) that is loaded BEFORE this file.
*/

/* ================================================================== */
/* =========== RADAR CONTROLS - FINAL & CORRECTED STYLES ============ */
/* ================================================================== */

/* --- מעטפת כללית למכ"ם --- */
#radar-map-container {
    position: relative;
    width: 100%;
    height: calc(100vh - 235px); /* גובה חדש ודינמי */
    min-height: 350px; /* גובה מינימלי */
    background-color: #eef2f5; /* רקע בהיר למפה לפני טעינה */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#radar-map-element {
    width: 100%;
    height: 100%; /* **קריטי**: המפה תמלא 100% מהגובה של הקונטיינר שלה */
    z-index: 1; /* ודא שהמפה מעל רקע אך מתחת לפקדים */
}

/* --- שכבות על (טעינה/שגיאה) --- */
.map-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.85); /* רקע לבן שקוף */
    z-index: 100;
    transition: opacity 0.3s ease;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}
.map-overlay.hidden {
    opacity: 0;
    pointer-events: none; /* מאפשר קליקים דרך השכבה כשהיא מוסתרת */
}
.loading-overlay #radar-loading-text {
    margin-top: 15px;
    font-size: 1.1em;
    color: #333;
}
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top: 4px solid #3498db; /* צבע כחול לספינר */
    border-radius: 50%;
    width: 40px; height: 40px;
    animation: spin 1s linear infinite;
}
/* Keyframe spin is already defined in main.css, assuming it's global. If not, copy it here. */

.error-overlay {
    color: var(--theme-danger-color); /* שימוש במשתנה גלובלי */
    font-weight: bold;
}
.error-overlay p {
    margin-bottom: 15px;
    font-size: 1.2em;
}

/* =================================================================== */
/* ============== עיצוב פרימיום מינימליסטי למכ"ם (Bottom Controls) ==== */
/* =================================================================== */

#radar-wrapper {
    /* Assuming #radar-wrapper is the main container for the map and controls */
    position: relative;
    width: 100%;
    height: calc(100vh - 235px); /* גובה חדש ודינמי */
    min-height: 550px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

/* This is a crucial override for #radar-map-element to ensure it fills the wrapper */
/* **שינוי**: לוודא שהמפה תמלא 100% מהגובה של הקונטיינר שלה */
#radar-map-container,
#radar-map-element {
    width: 100%;
    height: 100% !important; /* Override inline styles or Leaflet defaults */
    border: none;
    border-radius: 0;
    background-color: #e9ecef; /* רקע בהיר יותר למפה */
}

/* --- הווידג'טים הצפים --- */
#radar-wrapper .radar-widget {
    position: absolute;
    /* הגברת השקיפות ואפקט הזכוכית */
    background-color: rgba(255, 255, 255, 0.45);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    z-index: 1001;
    transition: all 0.3s ease;
    font-family: 'Heebo', sans-serif;
}

/* ווידג'ט השעה העליון */
#radar-timestamp-top-widget {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: 16px;
    font-size: 1.1em;
    font-weight: 600;
    color: #1a2530; /* טקסט כהה יותר לקריאות */
    white-space: nowrap;
}


/* * הקו המפריד שמופיע בין חלקי המידע (מודל, פרמטר, זמן).
 * מופיע רק כאשר יש תוכן לידו.
*/
#map-info-top-widget span:not(:last-child):not(:empty)::after {
    content: '|';
    margin-inline-start: 14px; /* מיקום הקו המפריד */
    color: rgba(44, 62, 80, 0.25); /* צבע שקוף ועדין */
    font-weight: 300;
}

/* הדגשה עדינה לשם המודל */
#map-info-model {
    font-weight: 600;
}

/* הטיה קלה לשם הפרמטר */
#map-info-parameter {
    font-style: italic;
}


/* --- מרכז הבקרה התחתון בעיצוב החדש --- */
#radar-map-controls.radar-controls-oval {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 25px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.45); /* שקיפות עדינה מאוד */
    -webkit-backdrop-filter: blur(14px); /* טשטוש רקע לאפקט זכוכית */
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    z-index: 1001; /* לוודא שהוא מעל המפה והווידג'ט העליון */
}

/* כפתורים פשוטים - אייקון בלבד */
#radar-map-controls .radar-control-button {
    background-color: transparent; /* ללא רקע */
    color: var(--theme-text-secondary-lighter); /* צבע אייקון כהה וברור */
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.3em;
    cursor: pointer;
    transition: all 0.2s ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* אפקט הובר עדין - רקע שקוף קל */
#radar-map-controls .radar-control-button:hover:not(:disabled) {
    background-color: rgba(255, 255, 255, 0.3);
    color: var(--theme-text-primary-lightest); /* שינוי קל בצבע בטקסט בריחוף */
}

/* סליידר שמראה התקדמות */
#radar-image-slider {
    flex-grow: 1;
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    min-width: 180px;
    max-width: 350px;
    height: 6px;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    direction: ltr; /* הסליידר תמיד יהיה משמאל לימין */
    /* רקע דינמי שיראה התקדמות - נעדכן אותו עם JS */
    background: #ffffff55; /* רקע ברירת מחדל */
    accent-color: var(--theme-accent-primary-medium); /* צבע מילוי לסליידר */
}

/* עיצוב הידית של הסליידר */
#radar-image-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    cursor: grab;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    border: 1px solid var(--theme-border-primary-dark-medium); /* גבול לידית */
}
#radar-image-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    cursor: grab;
    border: 1px solid var(--theme-border-primary-dark-medium); /* גבול לידית */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* מונה פריימים */
#radar-current-image-index-display {
    font-size: 0.9em;
    font-weight: 500;
    color: var(--theme-text-primary-lightest); /* צבע טקסט */
    min-width: 50px;
    text-align: center;
}

#radar-map-error {
    color: var(--theme-danger-color);
    text-align: center;
    margin-top: 8px;
    font-weight: bold;
    min-height: 1em;
    font-size: 0.85em;
}

/* ======================================== */
/* CSS חדש לתפריט צד (מודלים ופרמטרים) עם Overlay */
/* ======================================== */

/* כפתור פתיחת התפריט - ימין למעלה */
#internal-menu-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1999;
    font-size: 1.2em;
    padding: 5px 12px;
    background-color: rgba(255, 255, 255, 0.7); /* רקע מעט שקוף */
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    color: var(--theme-text-primary-lightest);
    cursor: pointer;
    transition: all 0.2s ease;
}
#internal-menu-btn:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* קונטיינר הרקע (Overlay) */
#internal-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(var(--theme-color-black-rgb), 0.6); /* רקע כהה שקוף */
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* הצגת הרקע כשהתפריט פתוח */
#internal-menu-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* התפריט עצמו - מגיע מהצד */
#internal-menu-content {
    position: absolute;
    top: 0;
    right: -320px; /* מתחיל מחוץ למסך בצד ימין */
    width: 90%;
    max-width: 300px;
    height: 100%;
    background-color: var(--theme-bg-primary-darker); /* רקע לבן */
    box-shadow: -2px 0 10px rgba(0,0,0,0.2);
    transition: right 0.3s ease-in-out;
    padding: 20px;
    overflow-y: auto; /* מאפשר גלילה אם התוכן ארוך */
    border-left: 1px solid var(--theme-border-primary-light);
}

/* הזזת התפריט פנימה כשהוא גלוי */
#internal-menu-overlay.visible #internal-menu-content {
    right: 0;
}

/* עיצוב כללי לכפתורים בתפריט */
.menu-item {
    padding: 15px;
    font-size: 1.1em;
    cursor: pointer;
    border-bottom: 1px solid var(--theme-border-primary-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--theme-text-secondary-lighter);
    transition: background-color 0.2s ease, color 0.2s ease;
}
.menu-item:hover {
    background-color: var(--theme-bg-primary-medium); /* רקע עדין בריחוף */
    color: var(--theme-text-primary-lightest);
}
.menu-item .fa-chevron-left { /* אייקון החץ */
    transition: transform 0.2s;
    color: var(--theme-text-tertiary-medium-light);
}
.menu-item:hover .fa-chevron-left {
    color: var(--theme-text-primary-lightest);
}
.menu-item.active .fa-chevron-left { /* סיבוב החץ כשתת-תפריט נפתח */
    transform: rotate(-90deg);
}

/* תת-תפריט של המפות (מוסתר בהתחלה) */
#maps-controls-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
    background-color: var(--theme-bg-primary-darkest); /* רקע כהה יותר לתת-תפריט */
    padding: 0 15px;
    border-bottom: 1px solid var(--theme-border-primary-light);
}
#maps-controls-wrapper.open {
    max-height: 1000px; /* ערך גבוה כדי לאפשר גדילה */
    padding: 15px;
}

/* עיצוב לבחירת מודל והרצה */
.menu-selector {
    margin-bottom: 15px;
}
.menu-selector label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--theme-text-secondary-lighter);
    font-size: 0.9em;
}
.menu-selector select {
    width: 100%;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid var(--theme-border-primary-dark-medium);
    background-color: var(--theme-bg-primary-darker);
    color: var(--theme-text-primary-lightest);
    font-size: 0.9em;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.menu-selector select:focus {
    outline: none;
    border-color: var(--theme-accent-primary-medium);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* עיצוב רשימת הפרמטרים */
.param-selector {
    display: flex;
    flex-direction: column;
    gap: 5px; /* מרווח קטן בין הפריטים */
}

.param-item {
    display: flex;
    align-items: center;
    gap: 10px; /* מרווח בין האייקון לטקסט */
    padding: 12px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-weight: 500;
    color: var(--theme-text-secondary-lighter);
}

.param-item:hover {
    background-color: var(--theme-bg-primary-medium); /* צבע ריחוף עדין */
}

.param-item.active {
    background-color: var(--theme-accent-bg-subtle); /* צבע רקע לפריט פעיל */
    color: var(--theme-accent-primary-medium); /* צבע טקסט לפריט פעיל */
    font-weight: 600;
}

.param-item i {
    width: 20px; /* רוחב קבוע לאייקון ליישור */
    text-align: center;
    color: var(--theme-text-tertiary-medium-light); /* צבע ברירת מחדל לאייקון */
}

.param-item.active i {
    color: var(--theme-accent-primary-medium); /* צבע אייקון לפריט פעיל */
}

/* עיצוב כפתור הטולטיפ כשהוא פעיל */
#tooltip-activation-btn.active {
    background-color: var(--theme-accent-primary-medium); /* צבע ירוק הדגשה */
    color: var(--theme-text-on-accent); /* טקסט לבן */
}

/* עיצוב אייקון כוונת המטרה שעל המפה */
.crosshair-marker-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--theme-text-primary-lightest); /* צבע כהה לכוונת */
    font-size: 24px;
    text-shadow: 0 0 4px rgba(255,255,255,0.8); /* צל לבן לנראות טובה יותר */
}

/* הסרת הרקע והגבול ש-Leaflet מוסיף ל-divIcon */
.leaflet-div-icon {
    background: transparent;
    border: none;
}

/* ============================================= */
/* REAL-TIME OBSERVATION STYLES (Station Markers) */
/* ============================================= */

/* --- 1. Base Marker Style (for ALL parameters) --- */
.station-marker-icon {
    position: relative; /* קריטי למיקום נכון של חץ הרוח */
    background-color: var(--theme-bg-primary-darker); /* רקע בהיר */
    border: 2px solid var(--theme-border-secondary-darker); /* גבול בינוני */
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 1em;
    font-weight: 700;
    color: var(--theme-text-primary-lightest); /* טקסט כהה */
    box-shadow: 0 2px 5px var(--theme-shadow-medium-light);
    text-align: center;
    line-height: 1.2;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* --- 2. Wind Marker Specifics --- */
.wind-marker-container .wind-speed {
    font-size: 1.2em; /* הדגשת מהירות הרוח */
    line-height: 1.1;
}

.wind-marker-container .wind-gust {
    font-size: 0.8em; /* הקטנת הגופן למשב */
    font-weight: 500;
    line-height: 1;
}

.wind-marker-container .wind-arrow {
    position: absolute;
    top: -18px; /* הצבת החץ מעל העיגול */
    width: 22px;
    height: 22px;
    color: var(--theme-accent-primary-medium); /* צבע ירוק כהה וברור לחץ */
    /* נקודת הסיבוב של החץ תהיה במרכז העיגול שתחתיו */
    transform-origin: center 33px; /* חשוב לסיבוב נכון */
}

.wind-marker-container .wind-arrow svg {
    width: 100%;
    height: 100%;
}

/*
 * הווידג'ט עצמו: ממוקם כאלמנט צף וממורכז בחלק העליון
 * עם אפקט 'זכוכית' עדין.
*/
#map-info-top-widget {
    position: absolute;
    top: 15px; /* מרווח מהקצה העליון של המפה */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001; /* לוודא שהוא מעל שכבות המפה */

    /* עיצוב המראה */
    background-color: rgba(255, 255, 255, 0.6);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px; /* פינות מעוגלות ליצירת צורת 'גלולה' */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    padding: 8px 18px; /* ריווח פנימי */

    /* סידור התוכן הפנימי */
    display: flex;
    align-items: center;
    gap: 14px; /* רווח בין הטקסטים */

    /* עיצוב הטקסט */
    font-family: 'Noto Sans Hebrew', sans-serif;
    font-size: 1rem; /* גודל 16px */
    font-weight: 500;
    color: #2c3e50; /* צבע טקסט כהה וברור */
    white-space: nowrap; /* למנוע שבירת שורה */
    transition: all 0.3s ease;
}

/* * הקו המפריד שמופיע בין חלקי המידע (מודל, פרמטר, זמן).
 * מופיע רק כאשר יש תוכן לידו.
*/
#map-info-top-widget span:not(:last-child):not(:empty)::after {
    content: '|';
    margin-inline-start: 14px; /* מיקום הקו המפריד */
    color: rgba(44, 62, 80, 0.25); /* צבע שקוף ועדין */
    font-weight: 300;
}

/* הדגשה עדינה לשם המודל */
#map-info-model {
    font-weight: 600;
}

/* הטיה קלה לשם הפרמטר */
#map-info-parameter {
    font-style: italic;
}

/* --- 3. Universal Color Scales (applied to .station-marker-icon) --- */
/* Temperature Scale */
.station-marker-icon.level-1-cold { background-color: #67e8f9; border-color: #0891b2; } /* ירוק-כחול בהיר */
.station-marker-icon.level-2-cool { background-color: #a7f3d0; border-color: #059669; } /* ירוק-טורקיז */
.station-marker-icon.level-3-mild { background-color: #fde047; border-color: #ca8a04; } /* צהוב-כתום */
.station-marker-icon.level-4-warm { background-color: #fb923c; border-color: #ea580c; } /* כתום */
.station-marker-icon.level-5-hot { background-color: #f87171; border-color: #dc2626; color: white;} /* אדום */

/* Humidity Scale */
.station-marker-icon.level-1-very-dry { background-color: #fef08a; border-color: #ca8a04; } /* צהוב */
.station-marker-icon.level-2-dry { background-color: #a7f3d0; border-color: #059669; } /* ירוק-בהיר */
.station-marker-icon.level-3-moderate { background-color: #93c5fd; border-color: #2563eb; } /* כחול-בהיר */
.station-marker-icon.level-4-humid { background-color: #67e8f9; border-color: #0891b2; } /* כחול-טורקיז */
.station-marker-icon.level-5-very-humid { background-color: #a5b4fc; border-color: #4f46e5; color: white; } /* סגול-כחול */

/* Wind & Gust Scale (now applied to wind container) */
.station-marker-icon.level-1-calm, .station-marker-icon.level-1-calm-gust { background-color: #e0e7ff; border-color: #6366f1; } /* תכלת בהיר */
.station-marker-icon.level-2-light, .station-marker-icon.level-2-light-gust { background-color: #c7d2fe; border-color: #4f46e5; } /* תכלת */
.station-marker-icon.level-3-moderate, .station-marker-icon.level-3-moderate-gust { background-color: #a5b4fc; border-color: #4338ca; color: white; } /* סגול-בהיר */
.station-marker-icon.level-4-strong, .station-marker-icon.level-4-strong-gust { background-color: #818cf8; border-color: #3730a3; color: white; } /* סגול */
.station-marker-icon.level-5-very-strong, .station-marker-icon.level-5-very-strong-gust { background-color: #6366f1; border-color: #312e81; color: white; } /* כחול-סגול */

/* Rain Scale */
.station-marker-icon.level-1-no-rain { background-color: #f1f5f9; border-color: #94a3b8; } /* אפור בהיר */
.station-marker-icon.level-2-drizzle { background-color: #a7f3d0; border-color: #059669; } /* ירוק-בהיר */
.station-marker-icon.level-3-light-rain { background-color: #67e8f9; border-color: #0891b2; } /* כחול-טורקיז */
.station-marker-icon.level-4-moderate-rain { background-color: #60a5fa; border-color: #2563eb; color: white;} /* כחול */
.station-marker-icon.level-5-heavy-rain { background-color: #4f46e5; border-color: #3730a3; color: white; } /* כחול-כהה */

/* Pressure Scale */
.station-marker-icon.level-1-very-low-pressure, .station-marker-icon.level-2-low-pressure { background-color: #fef08a; border-color: #ca8a04; } /* צהוב */
.station-marker-icon.level-3-normal-pressure { background-color: #e2e8f0; border-color: #64748b; } /* אפור-כחלחל */
.station-marker-icon.level-4-high-pressure, .station-marker-icon.level-5-very-high-pressure { background-color: #c7d2fe; border-color: #4f46e5; } /* תכלת */

/* Radiation Scale */
.station-marker-icon.level-1-no-radiation, .station-marker-icon.level-2-low-radiation { background-color: #e2e8f0; border-color: #64748b; } /* אפור-כחלחל */
.station-marker-icon.level-3-moderate-radiation { background-color: #fde047; border-color: #ca8a04; } /* צהוב-כתום */
.station-marker-icon.level-4-high-radiation { background-color: #fb923c; border-color: #ea580c; } /* כתום */
.station-marker-icon.level-5-extreme-radiation { background-color: #f87171; border-color: #dc2626; color: white;} /* אדום */

/* --- 4. Leaflet Override --- */
/* מונע מ-Leaflet להוסיף רקע או גבול לעטיפה של הסמן שלנו */
.leaflet-div-icon.leaflet-station-icon-wrapper {
    background: transparent;
    border: none;
}

/* ==========================================================
   Map Explanation Section Styles (New)
   ========================================================== */
.map-explanation-container {
    background-color: var(--theme-bg-primary-darker); /* רקע לבן נקי */
    border: 1px solid var(--theme-border-primary-light); /* גבול בהיר ועדין */
    border-radius: 8px; /* פינות מעוגלות */
    box-shadow: 0 4px 12px var(--theme-shadow-medium); /* צל עדין */
    padding: 20px; /* ריווח פנימי */
    margin-top: 25px; /* מרווח מהמפה שמעל */
    text-align: right; /* יישור לימין */
    direction: rtl; /* כיווניות מימין לשמאל */
    color: var(--theme-text-primary-lightest); /* צבע טקסט ראשי */
    line-height: 1.6; /* רווח שורות לקריאות טובה */
}

.map-explanation-container h3 {
    color: var(--theme-text-accent-primary); /* כותרת בצבע הדגשה ראשי (ירוק כהה) */
    font-size: 1.3em; /* גודל פונט מעט גדול יותר לכותרת */
    font-weight: 600; /* עובי פונט מודגש */
    margin-top: 0; /* ביטול מרווח עליון מובנה */
    margin-bottom: 10px; /* מרווח תחתון מהפסקה */
    padding-bottom: 8px; /* ריווח תחתון וקו הפרדה */
    border-bottom: 1px solid var(--theme-border-primary-light); /* קו הפרדה עדין */
}

.map-explanation-container p {
    font-size: 0.95em; /* גודל פונט קצת קטן יותר לפסקאות */
    margin-bottom: 0; /* ביטול מרווח תחתון מובנה אם זו הפסקה האחרונה */
    color: var(--theme-text-secondary-lighter); /* צבע טקסט משני, קצת פחות מודגש */
}

/* התאמות רספונסיביות למובייל */
@media (max-width: 768px) {
    /* **שינוי**: התאמת גובה המפה למובייל - גובה רספונסיבי, עם גובה מקסימלי */
    /* חשוב: הסרתי את min-height: 250px; מהקונטיינר הראשי (#radar-map-container)
     * וגם מ-#radar-wrapper מכיוון שזה היה קונפליקט וגרם לגלילה מיותרת */
    #radar-map-container,
    #radar-wrapper,
    #radarContent #radar-map-element {
        height: 75vh; /* גובה יחסי לשטח התצוגה, כדי להתאים למסכים שונים */
        width: 100%; /* ודא רוחב מלא */
    }

    /* **תיקון קריטי**: הסתרת קונטיינר הסבר המפה במובייל */
    .map-explanation-container {
        display: none; /* **תיקון: הסתרת ההסבר במובייל** */
    }

    /*
     * === פריסת פקדי מפה במובייל (סידור בשתי שורות) ===
     */

    /* 1. הגדרת הקונטיינר הראשי של הפקדים */
    #radar-map-controls.radar-controls-oval {
        display: flex;
        flex-wrap: wrap; /* מאפשר גלישה לשורה חדשה */
        justify-content: center; /* ממכרז את הפריטים בכל שורה */
        width: 90%;
        bottom: 10px;
        padding: 6px 8px;
        gap: 10px 15px; /* מרווח אנכי בין השורות ומרווח אופקי בין הכפתורים */
    }

    /* 2. הגדרת הסליידר כך שיאלץ מעבר שורה */
    #radar-image-slider {
        flex-basis: 100%; /* גורם לסליידר לתפוס שורה שלמה ו"לדחוף" את השאר למטה */
        min-width: initial; /* מאפס את הגדרת הרוחב המינימלי הקודמת */
        width: 100%; /* מוודא שהסליידר מתפרס על כל הרוחב */
    }

    #radar-map-controls .radar-control-button {
        width: 38px;
        height: 38px;
        font-size: 1.2em;
    }

    #radar-current-image-index-display {
        font-size: 0.8em;
    }

    #radar-timestamp-top-widget {
        top: 10px;
        padding: 8px 15px;
        font-size: 1em;
        border-radius: 12px;
    }

    /* === תפריט צד במובייל === */
    #internal-menu-btn {
        top: 8px;
        right: 8px;
        font-size: 1.1em;
        padding: 4px 10px;
    }

    #internal-menu-content {
        max-width: 85%;
        padding: 15px;
    }

    .menu-item {
        padding: 12px;
        font-size: 1em;
    }

    .menu-selector label {
        font-size: 0.8em;
    }

    .menu-selector select {
        padding: 6px;
        font-size: 0.85em;
    }

    .param-item {
        padding: 10px 8px;
        font-size: 0.9em;
    }
}

/* התאמות לטאבלטים */
@media (min-width: 769px) and (max-width: 1024px) {
    #radarContent #radar-map-element { height: 450px; }
}

/* התאמות למסכים גדולים */
@media (min-width: 1401px) {
    #radarContent #radar-map-element { height: 550px; }

    #radar-timestamp-top-widget {
        top: 25px;
        padding: 12px 25px;
        font-size: 1.2em;
    }

    #radar-map-controls.radar-controls-oval {
        bottom: 25px;
        padding: 10px 12px;
        gap: 10px;
    }

    #radar-map-controls .radar-control-button {
        width: 48px;
        height: 48px;
        font-size: 1.4em;
    }

    #radar-image-slider {
        max-width: 400px;
    }

    #radar-current-image-index-display {
        font-size: 1em;
    }

    #internal-menu-btn {
        top: 20px;
        right: 20px;
        font-size: 1.3em;
        padding: 6px 15px;
    }

    #internal-menu-content {
        max-width: 350px;
        padding: 25px;
    }

    .menu-item {
        padding: 18px;
        font-size: 1.2em;
    }

    .menu-selector label {
        font-size: 0.95em;
    }

    .menu-selector select {
        padding: 10px;
        font-size: 0.95em;
    }

    .param-item {
        padding: 14px 12px;
        font-size: 1em;
    }
}

/*
 * עיצוב חדש לסמני נקודות הקיצון - קטנים ועגולים יותר.
 */
.extreme-point-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 0.8em; /* גודל פונט קטן יותר */
    font-weight: bold;
    color: var(--theme-text-primary-lightest);
    width: 50px; /* רוחב קטן יותר */
    height: 50px; /* גובה קטן יותר */
    border-radius: 50%; /* הופך את הצורה לעיגול */
    padding: 4px;
    text-align: center;
    /* אפקט הגלאסמורפיזם */
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.extreme-point-icon.hot {
    color: #e53e3e;
    border-color: #e53e3e;
}

.extreme-point-icon.cold {
    color: #3182ce;
    border-color: #3182ce;
}