/* ==================== ТЕМНАЯ ТЕМА В СТИЛЕ DEEPSTATE ==================== */

/* Глобальные стили для темной темы */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #0f1419;
  color: #e0e0e0;
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Светлая тема */
body.light-theme {
  background: #f5f5f5;
  color: #333;
}

body.light-theme .sidebar {
  background:#ffffff;
  border-right-color: rgba(0, 0, 0, 0.1);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
}

body.light-theme .sidebar:hover {
  border-right-color: rgba(76, 175, 80, 0.3);
  box-shadow: 4px 0 30px rgba(0, 0, 0, 0.15);
}

body.light-theme .sidebar-btn {
  background: #ffffff;
  color: #1a1d29;
}

body.light-theme .sidebar-btn:hover {
  background: #f0f0f0;
  /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); */
  transform: scale(1.05);
}

body.light-theme .sidebar-btn:hover svg,
body.light-theme .sidebar-btn svg {
  color: #1a1d29 !important;
}

body.light-theme .sidebar-btn.active {
  background: rgba(76, 175, 80, 0.25);
  color: #2e7d32;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
  transform: scale(1);
}

body.light-theme .sidebar-btn.active:hover {
  background: rgba(76, 175, 80, 0.35);
  color: #1b5e20;
  box-shadow: 0 6px 16px rgba(76, 175, 80, 0.3);
  transform: scale(1.05);
}

body.light-theme .unified-controls {
  background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

body.light-theme .unified-controls:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  border-color: rgba(76, 175, 80, 0.3);
}

body.light-theme .section-header h4 {
  color: #2e7d32;
  text-shadow: 0 0 10px rgba(46, 125, 50, 0.3);
}

body.light-theme .control-btn {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body.light-theme .control-btn:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

body.light-theme .info-panel {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.1);
  color: #333;
}

body.light-theme .info-content p {
  color: #555;
}

body.light-theme .user-panel {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(0, 0, 0, 0.1);
  color: #333;
}


.osrm-directions-inputs,
.osrm-directions-errors,
.osrm-directions-routes,
.osrm-directions-instructions {
  font:15px/20px 'Open Sans', sans-serif;
  margin-bottom: 30px;
  background: rgba(15, 20, 25, 0.95);
  color: #e0e0e0;
}

.osrm-directions-summary {
  padding-left: 20px;
  padding-top: 10px;
  color: #e0e0e0;
}

.osrm-directions-inputs,
.osrm-directions-inputs *,
.osrm-directions-errors,
.osrm-directions-errors *,
.osrm-directions-routes,
.osrm-directions-routes *,
.osrm-directions-instructions,
.osrm-directions-instructions * {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

.map {
    background: #0f1419;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

/* ==================== SIDEBAR В СТИЛЕ DEEPSTATE ==================== */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 70px;
    background: #1a1d29;
    border-right: 1px solid rgba(76, 175, 80, 0.2);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
    z-index: 1000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    transition: all 0.3s ease;
}

.sidebar:hover {
    border-right-color: rgba(76, 175, 80, 0.4);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(76, 175, 80, 0.1);
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    padding: 80px 10px 0 10px; /* Добавили padding-top вместо logo */
}

.sidebar-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: #1a1d29;
    color: #d4d4d5;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
}

.sidebar-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: #4caf50;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

/* Hover состояние - как на фото */
.sidebar-btn:hover {
    background: #373a40;
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); */
    transform: scale(1.05);
}

.sidebar-btn:hover svg,
.sidebar-btn svg {
    color: #d4d4d5 !important;
}

/* Active/selected состояние - светлая с зеленым акцентом */
.sidebar-btn.active {
    background: rgba(180, 200, 185, 0.95);
    color: #2e7d32;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.25), inset 0 1px 2px rgba(255, 255, 255, 0.3);
    transform: scale(1);
}

.sidebar-btn.active svg {
    color: #1a1d29 !important;
}

.sidebar-btn.active::before {
    transform: scaleY(1);
}

/* При наведении на активную кнопку */
.sidebar-btn.active:hover {
    background: rgba(190, 210, 195, 1);
    color: #1b5e20;
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.35);
    transform: scale(1.05);
}

.sidebar-btn.active:hover svg {
    color: #1a1d29 !important;
}

.sidebar-btn svg {
    width: 24px;
    height: 24px;
}

/* Кнопка темы - прижимаем к низу nav */
#theme-toggle-btn {
    margin-top: auto;
}

.sidebar-user {
    width: 100%;
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border-top: 1px solid rgba(76, 175, 80, 0.2);
    margin-top: 20px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    transition: all 0.3s ease;
}

.user-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
}

.user-name-sidebar {
    font-size: 10px;
    color: #4caf50;
    text-align: center;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

/* Адаптация карты под sidebar */
.map {
    margin-left: 70px;
    width: calc(100% - 70px);
}

/* Стилизация scale control (показатель расстояния) */
.leaflet-control-scale {
    /* margin-left: 80px !important; */
    margin-bottom: 10px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

.leaflet-control-scale-line {
    border: 2px solid #4caf50 !important;
    border-top: none !important;
    border-right: none !important;
    color: #4caf50 !important;
    font-weight: 400 !important;
    text-shadow: 0 0 5px rgba(76, 175, 80, 0.5) !important;
    background: transparent !important;
    line-height: 1.3 !important;
    padding: 2px 5px !important;
}

body.light-theme .leaflet-control-scale {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

body.light-theme .leaflet-control-scale-line {
    border-color: #2e7d32 !important;
    color: #2e7d32 !important;
    text-shadow: none !important;
}

/* ==================== СТИЛИЗАЦИЯ ZOOM CONTROL (+ / -) ==================== */

/* Контейнер zoom control */
.leaflet-control-zoom {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    position: fixed !important;
    right: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    left: auto !important;
}

/* Кнопки zoom - простой стиль, темная тема */
.leaflet-control-zoom a {
    width: 42px !important;
    height: 42px !important;
    background: rgba(26, 29, 41, 0.95) !important;
    border: none !important;
    color: #d4d4d5 !important;
    border-radius: 12px !important;
    margin-bottom: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    font-size: 22px !important;
    font-weight: 400 !important;
    line-height: 42px !important;
    text-align: center !important;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease !important;
    text-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.leaflet-control-zoom a:hover {
    background: rgba(26, 29, 41, 1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
    transform: scale(1.05) !important;
}

.leaflet-control-zoom a:first-child {
    border-radius: 12px !important;
    margin-bottom: 8px !important;
}

.leaflet-control-zoom a:last-child {
    border-radius: 12px !important;
    margin-bottom: 0 !important;
}

/* Светлая тема для zoom control */
body.light-theme .leaflet-control-zoom a {
    background: rgba(255, 255, 255, 0.95) !important;
    border: none !important;
    color: #1a1d29 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    text-shadow: none !important;
}

body.light-theme .leaflet-control-zoom a:hover {
    background: rgba(255, 255, 255, 1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

/* ==================== СТИЛИ ДЛЯ МАРКЕРОВ СТРЕЛОК ==================== */

/* Базовые стили для маркеров стрелок */
.arrow-marker-dot {
    border-radius: 50%;
    cursor: move;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Центральный маркер (меньше) */
.arrow-marker-center {
    width: 16px;
    height: 16px;
    /* Темная тема - светлые маркеры */
    background: rgba(255, 255, 255, 0.7);
    border: 2px solid #ffffff;
}

/* Конечный маркер (больше) */
.arrow-marker-end {
    width: 20px;
    height: 20px;
    /* Темная тема - светлые маркеры */
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid #ffffff;
}

/* Hover эффекты для темной темы */
.arrow-marker-dot:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.arrow-marker-center:hover {
    background: rgba(255, 255, 255, 0.9);
}

.arrow-marker-end:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Светлая тема - темные маркеры */
body.light-theme .arrow-marker-center {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #000000;
}

body.light-theme .arrow-marker-end {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid #000000;
}

body.light-theme .arrow-marker-center:hover {
    background: rgba(0, 0, 0, 0.7);
}

body.light-theme .arrow-marker-end:hover {
    background: rgba(0, 0, 0, 0.6);
}

#sidebar-refresh-circles-btn,
#sidebar-submit-circles-btn {
    display: none !important;
}

.circles-display {
    position: fixed;
    top: 20px;
    left: 90px;
    z-index: 999999;
    background: linear-gradient(135deg, #1a1d29 0%, #13161f 100%);
    border: 1px solid rgba(76, 175, 80, 0.4);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(76, 175, 80, 0.1);
    padding: 20px 25px;
    backdrop-filter: blur(15px);
    transition: all 0.3s ease;
    min-width: 281.5px;
}

.circles-display:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(76, 175, 80, 0.2);
}

.circles-content h3 {
    margin: 0 0 15px 0;
    color: #4caf50;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.circles-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.circle-control-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2) 0%, rgba(76, 175, 80, 0.1) 100%);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.circle-control-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.3) 0%, rgba(76, 175, 80, 0.2) 100%);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    transform: translateY(-2px);
    border-color: rgba(76, 175, 80, 0.5);
}

.circle-control-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(60, 60, 60, 0.3);
    color: #666;
    border-color: rgba(100, 100, 100, 0.3);
}

.circles-hint {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    font-style: italic;
}

/* Светлая тема для плашки окружностей */
body.light-theme .circles-display {
    background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
    border-color: rgba(76, 175, 80, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

body.light-theme .circles-content h3 {
    color: #2e7d32;
    text-shadow: 0 0 10px rgba(46, 125, 50, 0.3);
}

body.light-theme .circle-control-btn {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(76, 175, 80, 0.1) 100%);
    color: #2e7d32;
    border-color: rgba(76, 175, 80, 0.3);
}

body.light-theme .circle-control-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.25) 0%, rgba(76, 175, 80, 0.15) 100%);
}

body.light-theme .circle-control-btn:disabled {
    background: rgba(200, 200, 200, 0.5);
    color: #999;
}

body.light-theme .circles-hint {
    color: rgba(0, 0, 0, 0.5);
}

/* ==================== ПЛАШКА СТРЕЛОК (ARROW DISPLAY) ==================== */

.arrow-display {
    position: fixed;
    top: 20px;
    left: 90px;
    z-index: 999999;
    background: linear-gradient(135deg, #1a1d29 0%, #13161f 100%);
    border: 1px solid rgba(76, 175, 80, 0.4);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(76, 175, 80, 0.1);
    padding: 20px 25px;
    backdrop-filter: blur(15px);
    transition: all 0.3s ease;
    min-width: 220px;
}

.arrow-display:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(76, 175, 80, 0.2);
}

.arrow-content h3 {
    margin: 0 0 15px 0;
    color: #4caf50;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.arrow-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.arrow-control-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2) 0%, rgba(76, 175, 80, 0.1) 100%);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.arrow-control-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.3) 0%, rgba(76, 175, 80, 0.2) 100%);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    transform: translateY(-2px);
    border-color: rgba(76, 175, 80, 0.5);
}

.arrow-control-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(60, 60, 60, 0.3);
    color: #666;
    border-color: rgba(100, 100, 100, 0.3);
}

.arrow-hint {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 11px;
    margin: 10px 0 0 0;
    font-style: italic;
}

/* Светлая тема для плашки стрелок */
body.light-theme .arrow-display {
    background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
    border-color: rgba(76, 175, 80, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

body.light-theme .arrow-content h3 {
    color: #2e7d32;
    text-shadow: 0 0 10px rgba(46, 125, 50, 0.3);
}

body.light-theme .arrow-control-btn {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(76, 175, 80, 0.1) 100%);
    color: #2e7d32;
    border-color: rgba(76, 175, 80, 0.3);
}

body.light-theme .arrow-control-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.25) 0%, rgba(76, 175, 80, 0.15) 100%);
}

body.light-theme .arrow-control-btn:disabled {
    background: rgba(200, 200, 200, 0.5);
    color: #999;
}

body.light-theme .arrow-hint {
    color: rgba(0, 0, 0, 0.5);
}

/* ==================== ПЛАШКА ЛИНЕЙКИ (RULER DISPLAY) ==================== */

.ruler-display {
    position: fixed;
    top: 20px;
    left: 90px;
    z-index: 999999;
    background: linear-gradient(135deg, #1a1d29 0%, #13161f 100%);
    border: 1px solid rgba(76, 175, 80, 0.4);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(76, 175, 80, 0.1);
    padding: 20px 30px;
    backdrop-filter: blur(15px);
    transition: all 0.3s ease;
    min-width: 200px;
}

.ruler-display:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(76, 175, 80, 0.2);
}

.ruler-content h3 {
    margin: 0 0 15px 0;
    color: #4caf50;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.ruler-distance {
    text-align: center;
    margin: 15px 0;
}

.distance-value {
    font-size: 42px;
    font-weight: 700;
    color: #4caf50;
    text-shadow: 0 0 15px rgba(76, 175, 80, 0.6);
    line-height: 1;
}

.distance-unit {
    font-size: 24px;
    color: #4caf50;
    margin-left: 8px;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.ruler-hint {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    margin: 10px 0 15px 0;
}

.clear-ruler-btn {
    width: 100%;
    padding: 10px 20px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: 1px solid rgba(239, 68, 68, 0.5);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.clear-ruler-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
}

/* Светлая тема для линейки */
body.light-theme .ruler-display {
    background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
    border-color: rgba(76, 175, 80, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

body.light-theme .ruler-content h3 {
    color: #2e7d32;
    text-shadow: 0 0 10px rgba(46, 125, 50, 0.3);
}

body.light-theme .distance-value,
body.light-theme .distance-unit {
    color: #2e7d32;
    text-shadow: 0 0 10px rgba(46, 125, 50, 0.3);
}

body.light-theme .ruler-hint {
    color: rgba(0, 0, 0, 0.6);
}

/* Скрываем секцию стрелок из старой панели (функционал перенесен в sidebar) */
#arrows-section,
#arrows-divider {
    display: none !important;
}

/* Скрываем всю панель управления (функционал перенесен в sidebar) */
.unified-controls {
    display: none !important;
}

/* Скрываем старую панель "Управление окружностями" */
.info-panel {
    display: none !important;
}

/* Единая панель управления - Темная тема */
.unified-controls {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 999999;
    background: linear-gradient(135deg, #1a1d29 0%, #13161f 100%);
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(76, 175, 80, 0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 200px;
    backdrop-filter: blur(15px);
    transition: all 0.3s ease;
}

.unified-controls:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.5);
}

/* Секция управления */
.control-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.section-header {
    text-align: center;
    margin-bottom: 8px;
}

.section-header h4 {
    margin: 0;
    color: #4caf50;
    font-size: 14px;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.section-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

/* Разделитель между секциями */
.section-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    margin: 5px 0;
    border-radius: 1px;
}


.control-btn {
    width: 55px;
    height: 55px;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 26px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.control-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.control-btn:hover::before {
    left: 100%;
}

.control-btn:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.add-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-color: #3b82f6;
}

.add-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.delete-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border-color: #ef4444;
}

.delete-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

.clear-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border-color: #f59e0b;
}

.clear-btn:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.4);
}

.refresh-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
    border-color: #8b5cf6;
}

.refresh-btn:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

.submit-btn {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
    border-color: #06b6d4;
}

.submit-btn:hover {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
    box-shadow: 0 8px 20px rgba(6, 182, 212, 0.4);
}

.direction-btn {
    background: linear-gradient(135deg, #ff6b35 0%, #f97316 100%);
    color: white;
    border-color: #ff6b35;
}

.direction-btn:hover {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.4);
}

.edit-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border-color: #10b981;
}

.edit-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}


.control-btn:disabled {
    background: linear-gradient(135deg, #6c757d 0%, #adb5bd 100%);
    color: #fff;
    cursor: not-allowed;
    transform: none;
    opacity: 0.6;
    border-color: #6c757d;
}

.control-btn:disabled:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, #6c757d 0%, #adb5bd 100%);
}

.control-btn:disabled::before {
    display: none;
}


/* Панель пользователя */
.user-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000000;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    border: 2px solid #1e40af;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.4);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    padding: 10px 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info span {
    font-weight: 600;
    color: white;
    font-size: 14px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.logout-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border: none;
    border-radius: 8px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.logout-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.user-panel.guest {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    border-color: #1e40af;
}

.user-panel.guest span {
    color: #e0e7ff;
}

/* Уведомление для гостей */
.guest-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000000;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    max-width: 400px;
    width: 90%;
    animation: slideIn 0.3s ease;
}

.notification-content {
    padding: 10px 35px 10px 15px;
    text-align: center;
    position: relative;
}

.notification-content h4 {
    margin: 0 0 5px 0;
    color: #007bff;
    font-size: 14px;
    font-weight: 600;
}

.notification-content p {
    margin: 0;
    color: #666;
    line-height: 1.3;
    font-size: 12px;
}

.notification-content a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.notification-content a:hover {
    color: #0056b3;
}

.notification-content button {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-content button:hover {
    background: #c82333;
    transform: scale(1.1);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Информационная панель */
.info-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999998;
    background: #282a2f;
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
    transition: all 0.3s ease;
    max-width: 300px;
    min-width: 250px;
}

/* Светлая тема для info-panel */
body.light-theme .info-panel {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    color: #333;
}

.info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px 10px 20px;
    border-bottom: 1px solid rgba(76, 175, 80, 0.2);
}

body.light-theme .info-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.info-header h3 {
    margin: 0;
    color: #e0e0e0;
    font-size: 16px;
    font-weight: 600;
}

body.light-theme .info-header h3 {
    color: #2e7d32;
}

.toggle-btn {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.1);
}

body.light-theme .toggle-btn {
    background: rgba(76, 175, 80, 0.15);
    color: #2e7d32;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.toggle-btn:hover {
    background: rgba(76, 175, 80, 0.3);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

body.light-theme .toggle-btn:hover {
    background: rgba(76, 175, 80, 0.25);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.15);
}

.info-content {
    padding: 15px 20px 20px 20px;
    max-height: 300px;
    overflow-y: auto;
}

.info-content p {
    margin: 8px 0;
    font-size: 13px;
    line-height: 1.4;
    color: #e0e7ff;
}

.info-content strong {
    color: white;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.info-panel.collapsed .info-content {
    display: none;
}

.info-panel.collapsed .toggle-btn::after {
    content: '+';
}

.info-panel:not(.collapsed) .toggle-btn::after {
    content: '−';
}


.fill-osrm {
  background-color: rgba(37,72,127, 0.8);
}

.fill-dark {
  background-color: #404040;
}

.dark {
  color: #fff;
}


.leaflet-control-scale {
  position: absolute;
  /* left: 10px; */
  bottom: 1px;
}


.leaflet-control-zoom {
  position: absolute;
  left: 0px;
  top: 60px;
  color: rgba(37,72,127, 0.8);
}

.leaflet-bar a {
  color: rgba(37,72,127, 0.8);
}

.leaflet-control-locate.leaflet-bar a {
  color: rgba(37,72,127, 0.8);
  background-image: url('../images/crosshairs.svg');
  width: 50px;
  height: 60px;
  border-radius: 5px;
  z-index: 100;
}


.leaflet-control-locate {
  left: 40px;
  top: 60px;
}

/* Стили для стрелки направления */
.direction-arrow-marker {
  cursor: move !important;
}

.direction-arrow-marker:hover {
  transform: scale(1.1);
  transition: transform 0.2s ease;
}

.direction-arrow-center-marker {
  cursor: move !important;
}

.direction-arrow-center-marker:hover {
  transform: scale(1.2);
  transition: transform 0.2s ease;
}


/* Стили для popup окружностей */
/* Темная тема для тултипа (по умолчанию) */
.circle-popup .leaflet-popup-content-wrapper {
  background: linear-gradient(135deg, #1a1d29 0%, #13161f 100%);
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(76, 175, 80, 0.1);
  border: 1px solid rgba(76, 175, 80, 0.4);
  backdrop-filter: blur(15px);
}

.circle-popup .leaflet-popup-content {
  margin: 0;
  padding: 0;
  font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: #ffffff !important;
}

/* Стили для элементов тултипа - темная тема */
.popup-content {
  text-align: center;
  font-family: 'Open Sans', sans-serif;
  font-size: 11px;
  color: #ffffff;
  padding: 8px;
}

.popup-title {
  font-size: 13px;
  font-weight: bold;
  color: #4caf50;
  margin-bottom: 4px;
  text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.popup-subtitle {
  font-size: 12px;
  color: #ffffff;
  margin-bottom: 2px;
}

.popup-owner {
  font-size: 9px;
  color: #ffffff;
  margin-bottom: 2px;
}

.popup-info {
  font-size: 10px;
  color: #ffffff;
  margin: 6px 0;
  padding: 4px;
  background: rgba(76, 175, 80, 0.1);
  border-radius: 8px;
  border-left: 3px solid #4caf50;
}

.popup-status {
  font-size: 9px;
  color: #cccccc;
  margin-top: 6px;
}

.circle-popup .leaflet-popup-tip {
  background: #1a1d29;
  border: 1px solid rgba(76, 175, 80, 0.4);
}

/* Скрываем крестик закрытия popup */
.circle-popup .leaflet-popup-close-button {
  display: none !important;
}

/* Светлая тема для тултипа окружностей */
body.light-theme .circle-popup .leaflet-popup-content-wrapper {
  background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%) !important;
  border-color: rgba(76, 175, 80, 0.3) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
}

body.light-theme .circle-popup .leaflet-popup-content {
  color: #000000 !important;
}

/* Стили для элементов тултипа - светлая тема */
body.light-theme .popup-content {
  color: #000000;
}

body.light-theme .popup-title {
  color: #1b5e20;
  text-shadow: 0 0 10px rgba(46, 125, 50, 0.3);
}

body.light-theme .popup-subtitle {
  color: #000000;
}

body.light-theme .popup-owner {
  color: #000000;
}

body.light-theme .popup-info {
  color: #000000;
  background: rgba(76, 175, 80, 0.1);
  border-left-color: #4caf50;
}

body.light-theme .popup-status {
  color: #666666;
}

body.light-theme .circle-popup .leaflet-popup-tip {
  background: #ffffff !important;
  border-color: rgba(76, 175, 80, 0.3) !important;
}

/* Стили для модального окна настройки стрелки */
.arrow-modal {
  display: none;
  position: fixed;
  z-index: 1000000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
}

/* (removed) auth modal styles no longer needed */

.arrow-modal .modal-content {
  background: #1a1d29;
  border: 1px solid rgba(76, 175, 80, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
  margin: 10% auto;
  padding: 0;
  border-radius: 12px;
  width: 400px;
  max-width: 90%;
  animation: modalSlideIn 0.3s ease;
}

body.light-theme .arrow-modal .modal-content {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.arrow-modal .modal-header {
  background: transparent;
  color: #e0e0e0;
  padding: 20px;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(76, 175, 80, 0.2);
}

body.light-theme .arrow-modal .modal-header {
  color: #2e7d32;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.arrow-modal .modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.arrow-modal .modal-body {
  padding: 25px;
}

.arrow-modal .setting-group {
  margin-bottom: 20px;
}

.arrow-modal .setting-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #d0d0d0;
  font-size: 14px;
}

body.light-theme .arrow-modal .setting-group label {
  color: #555;
}

.arrow-modal .color-input {
  width: 100%;
  height: 40px;
  border: 1px solid rgba(76, 175, 80, 0.3);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.3s ease;
  background: #282a2f;
}

body.light-theme .arrow-modal .color-input {
  background: #f5f5f5;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.arrow-modal .color-input:hover {
  border-color: #4caf50;
}

.arrow-modal .size-slider {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(76, 175, 80, 0.2);
  outline: none;
  -webkit-appearance: none;
  margin-bottom: 10px;
}

body.light-theme .arrow-modal .size-slider {
  background: rgba(0, 0, 0, 0.1);
}

.arrow-modal .size-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #4caf50;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.arrow-modal .size-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #4caf50;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.arrow-modal .direction-input {
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(76, 175, 80, 0.3);
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s ease;
  background: #282a2f;
  color: #e0e0e0;
}

body.light-theme .arrow-modal .direction-input {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.2);
  color: #333;
}

.arrow-modal .direction-input:focus {
  outline: none;
  border-color: #4caf50;
}

.arrow-modal .modal-footer {
  padding: 20px 25px;
  background: transparent;
  border-radius: 0 0 12px 12px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  border-top: 1px solid rgba(76, 175, 80, 0.2);
}

body.light-theme .arrow-modal .modal-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.arrow-modal .apply-btn {
  background: #4caf50;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.arrow-modal .apply-btn:hover {
  background: #45a049;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.arrow-modal .cancel-btn {
  background: #373a40;
  color: #e0e0e0;
  border: 1px solid rgba(76, 175, 80, 0.2);
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

body.light-theme .arrow-modal .cancel-btn {
  background: #f0f0f0;
  color: #333;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.arrow-modal .cancel-btn:hover {
  background: #45494f;
  transform: translateY(-1px);
}

body.light-theme .arrow-modal .cancel-btn:hover {
  background: #e0e0e0;
}

/* Стили для модального окна выбора типа оружия */
.weapon-modal {
  display: none;
  position: fixed;
  z-index: 1000000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
}

.weapon-modal-content {
  background: #1a1d29;
  border: 1px solid rgba(76, 175, 80, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
  margin: 10% auto;
  padding: 0;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  animation: modalSlideIn 0.3s ease;
}

body.light-theme .weapon-modal-content {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.weapon-modal-header {
  background: transparent;
  color: #e0e0e0;
  padding: 20px;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(76, 175, 80, 0.2);
}

body.light-theme .weapon-modal-header {
  color: #2e7d32;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.weapon-modal-header h3 {
  margin: 0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 1.3em;
}

.close-btn {
  background: none;
  border: none;
  color: #e0e0e0;
  font-size: 2em;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

body.light-theme .close-btn {
  color: #555;
}

.close-btn:hover {
  background-color: rgba(76, 175, 80, 0.2);
  transform: scale(1.1);
}

body.light-theme .close-btn:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.weapon-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  padding: 30px;
}

.weapon-btn {
  background: #282a2f;
  border: 1px solid rgba(76, 175, 80, 0.3);
  border-radius: 12px;
  padding: 20px 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: Arial, sans-serif;
}

body.light-theme .weapon-btn {
  background: #f5f5f5;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.weapon-btn:hover {
  background: #373a40;
  border-color: #4caf50;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(76, 175, 80, 0.3);
}

body.light-theme .weapon-btn:hover {
  background: #e8e8e8;
  border-color: #4caf50;
  box-shadow: 0 8px 20px rgba(76, 175, 80, 0.2);
}

.weapon-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(76, 175, 80, 0.2);
}

.weapon-icon {
  font-size: 2.5em;
  line-height: 1;
}

.weapon-name {
  font-size: 1em;
  font-weight: 600;
  color: #e0e0e0;
  text-align: center;
}

body.light-theme .weapon-name {
  color: #333;
}

/* Адаптивность для модального окна */
@media (max-width: 768px) {
  .weapon-modal-content {
    margin: 5% auto;
    width: 95%;
  }
  
  .weapon-options {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    padding: 20px;
  }
  
  .weapon-btn {
    padding: 15px 10px;
  }
  
  .weapon-icon {
    font-size: 2em;
  }
  
  .weapon-name {
    font-size: 0.9em;
  }
}

/* Стили для модального окна редактирования информации */
.info-modal {
  display: none;
  position: fixed;
  z-index: 1000001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
}

.info-modal-content {
  background: linear-gradient(135deg, #1a1d29 0%, #13161f 100%);
  border: 1px solid rgba(76, 175, 80, 0.4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7), inset 0 1px 1px rgba(76, 175, 80, 0.1);
  margin: 10% auto;
  padding: 0;
  border-radius: 15px;
  width: 85%;
  max-width: 450px;
  min-width: 300px;
  backdrop-filter: blur(15px);
  animation: modalSlideIn 0.3s ease;
  overflow: hidden;
}

.info-modal-header {
  background: linear-gradient(135deg, #1a1d29 0%, #13161f 100%);
  color: #4caf50;
  padding: 18px 20px;
  border-radius: 13px 13px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(76, 175, 80, 0.3);
  text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
}

.info-modal-header h3 {
  margin: 0;
  font-size: 1.3em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.info-modal-body {
  padding: 25px;
  background: transparent;
}

.info-modal-body textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(76, 175, 80, 0.3);
  border-radius: 8px;
  font-size: 14px;
  font-family: Arial, sans-serif;
  resize: vertical;
  min-height: 100px;
  max-height: 150px;
  transition: all 0.3s ease;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.9);
}

.info-modal-body textarea:focus {
  outline: none;
  border-color: #4caf50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.char-counter {
  text-align: right;
  margin-top: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.char-counter span {
  font-weight: 600;
}

.info-modal-footer {
  padding: 0;
  background: transparent;
  border-radius: 0;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  border-top: none;
  margin-top: 20px;
}

.save-btn, .cancel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.2) 0%, rgba(76, 175, 80, 0.1) 100%);
  color: #4caf50;
  border: 1px solid rgba(76, 175, 80, 0.3);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  min-width: 90px;
}

.save-btn:hover, .cancel-btn:hover {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.3) 0%, rgba(76, 175, 80, 0.2) 100%);
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
  transform: translateY(-2px);
  border-color: rgba(76, 175, 80, 0.5);
}

/* Светлая тема для модалки редактирования */
body.light-theme .info-modal-content {
  background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
  border-color: rgba(76, 175, 80, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

body.light-theme .info-modal-header {
  background: linear-gradient(135deg, #ffffff 0%, #f8f8f8 100%);
  color: #2e7d32;
  border-bottom: 1px solid rgba(76, 175, 80, 0.3);
  text-shadow: 0 0 10px rgba(46, 125, 50, 0.3);
}

body.light-theme .info-modal-header h3 {
  color: #2e7d32;
  text-shadow: 0 0 10px rgba(46, 125, 50, 0.3);
}

body.light-theme .info-modal-body textarea {
  background: rgba(255, 255, 255, 0.8);
  color: #333;
  border-color: rgba(76, 175, 80, 0.3);
}

body.light-theme .info-modal-body textarea:focus {
  background: rgba(255, 255, 255, 0.95);
  border-color: #4caf50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

body.light-theme .char-counter {
  color: rgba(0, 0, 0, 0.6);
}

body.light-theme .save-btn, 
body.light-theme .cancel-btn {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(76, 175, 80, 0.1) 100%);
  color: #2e7d32;
  border-color: rgba(76, 175, 80, 0.3);
}

body.light-theme .save-btn:hover, 
body.light-theme .cancel-btn:hover {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.25) 0%, rgba(76, 175, 80, 0.15) 100%);
}

/* Адаптивность для модального окна */
@media (max-width: 768px) {
  .info-modal-content {
    width: 95%;
    margin: 5% auto;
    max-width: none;
  }
  
  .info-modal-header {
    padding: 15px 18px;
  }
  
  .info-modal-header h3 {
    font-size: 1.2em;
  }
  
  .info-modal-body {
    padding: 20px 18px;
  }
  
  .info-modal-footer {
    padding: 15px 18px 20px 18px;
    flex-direction: column;
  }
  
  .save-btn, .cancel-btn {
    width: 100%;
    margin: 0;
  }
}

/* Not used: {
  background-image: url('../images/crosshairs.svg');
  width: 36px;
  height: 36px;
  color: rgba(37,72,127, 0.8);
  background-color: rgba(37,72,127, 0.8);
  box-shadow: 0 1px 5px rgba(0,0,0,0.65);
  border-radius: 4px;
  z-index: 100;
} */


.leaflet-control-layers {
  position: absolute;
  left: 0px;
  bottom: 35px;
}

.leaflet-control-layers-expanded {
  width: 180px;
}


.leaflet-retina .leaflet-control-layers-toggle {
    background-image: url('../images/layers.svg');
    background-size: 26px 26px;
}

.leaflet-control-layers-toggle {
  background-image: url('../images/layers.svg');
  width: 36px;
  height: 36px;
  background-color: rgba(37,72,127, 0.8);
  box-shadow: 0 1px 5px rgba(0,0,0,0.65);
  border-radius: 4px;
}

.leaflet-bar a, .leaflet-control-layers-toggle {
  background-position: 55% 70%;
  background-repeat: no-repeat;
  display: block;
  background-size: 85%;
}

.leaflet-control-layers-expanded {
  padding: 6px 10px 6px 6px;
  color: #fff;
  background-color: rgba(37,72,127, 0.8);
}


.leaflet-osrm-tools-container
{
  box-shadow: 0 1px 5px rgba(0,0,0,0.65);
  background-color: rgba(37,72,127, 0.8);
  border-radius: 4px;
  width: 161px;
  height: 26px;
}



.leaflet-osrm-waypoint-label
{
  background-color: rgba(0, 0, 0, 0.5);
  border-color: rgba(0, 0, 0, 0.5);
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
  color: #fff;
}


.leaflet-routing-container {
  position: fixed;
  width: 33.3333%;
  max-width: 340px;
  min-width: 200px;
  padding-right: 0px;
  transition: 0.5s;
}

.leaflet-routing-container.dark {
  z-index: 10;
  background: none repeat scroll 0% 0% rgba(255, 255, 255, 0.85);
  top: 0px;
  right: 0px;
  bottom: 0px;
  margin: 0px !important;
  background-image: url('../images/osrm_logo.svg');
  -webkit-background-size: 200px 60px;
  background-size: 200px 60px;
  background-position: -20px 10px;
  background-repeat: no-repeat;
  padding-top: 50px;
}

.leaflet-routing-geocoders div {
  padding: 4px 0px 4px 0px;
}

.leaflet-routing-geocoder {
  position: relative;
  background-color: rgba(255,255,255,0.9);
  margin: 0 0 0 0;
  border-bottom: 0px solid #000;
}

.leaflet-container button {
  margin: 0 10px 0 0;
  float: left;
  width: 40px;
  height: 40px;
  background-color: white;
}

.leaflet-routing-geocoders button {
  font: bold 18px 'Lucida Console', Monaco, monospace;
  margin: 0;
  margin-right: 3px;
  float: right;
  cursor: pointer;
  background-color: rgba(37,72,127, 0.75);
  transition: background-color 0.2s ease;
  border: 0px;
  border-radius: 0 0 5px 5px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  margin-right: 0px;
  color: white;
}

.leaflet-routing-add-waypoint {
  display: block;
}

.leaflet-routing-add-waypoint:after {
  content: ' + ';
}

.leaflet-routing-reverse-waypoints:after {
  font-weight: bold;
  content: '\21c5';
  color: white;
}

.leaflet-routing-remove-waypoint {
  background-color: transparent;
  display: inline-block;
  vertical-align: middle;
  cursor: pointer;
  position: relative;
  padding-left: 10px;
}

.leaflet-routing-remove-waypoint:after {
  position: absolute;
  display: block;
  width: 15px;
  height: 1px;
  z-index: 1;
  bottom: 0;
  margin: auto;
  font-size: 18px;
  font-weight: bold;
  content: "\00d7";
  text-align: center;
  cursor: pointer;
  color:  rgba(37,72,127, 0.6);
  padding-bottom: 16px;
  margin-top: -10px;
  margin-left: 0px;
  line-height: 1;
}

.leaflet-routing-remove-waypoint {
    background-color: transparent;
    display: inline-block;
    vertical-align: middle;
    cursor: pointer;
    margin-top: 10px;
}

.leaflet-routing-remove-waypoint:hover {
  color: black;
  transition: background-color 0.2s ease;
}

.leaflet-routing-alternatives-container {
  position: fixed;
  right: 0px;
  top: 60px;
  width: 45%;
  max-width: 340px;
  min-width: 200px;
  height: 95%;
  overflow: scroll;
  transition: 0.5s;
}

/* OSRM + Leaflet toolbar icons */
.leaflet-bar {
  box-shadow: 0 1px 5px rgba(0,0,0,0.65);
  border-radius: 4px;
}

.leaflet-bottom .leaflet-control {
  margin-bottom: 0px;
}

.leaflet-left .leaflet-control {
  margin-left: 10px;
  margin-bottom: 20px;
}

.osrm-directions-icon {
    background-image: url('../images/osrm.toolbar.icons.svg');
    -webkit-background-size: 146px 24px;
    background-size: 170px 24px;
    margin: 0;
    content: '';
    display: inline-block;
    vertical-align: top;
    width: 24px;
    height: 24px;
}

.osrm-add-icon  { background-position: -280px 0; }
.osrm-via-icon  { background-position: -300px 0; }

.osrm-editor-icon  { background-position: -48px 0; }
.osrm-josm-icon  { background-position: -72px 0; }
.osrm-debug-icon  { background-position: -96px 0; }
.osrm-mapillary-icon  { background-position: -120px 0; }
.osrm-gpx-icon  { background-position: -146px 0; }
.osrm-localization-chooser {
    color: #ffffff;
    background: transparent;
    border: none;
    height: 24px;
    padding-left: 3px;
    padding-right: 3px;
    cursor: pointer;
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
}
.osrm-localization-chooser:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.leaflet-osrm-tools-hide
{
  display: none;
}


.osrm-directions-inputs {
  position: fixed;
  left: 10px;
  top: 10px;
  width: 45%;
  max-width: 350px;
  min-width: 200px;
  overflow: auto;
  max-height: 75%;
}

.leaflet-routing-geocoders.osrm-directions-inputs .leaflet-routing-geocoder:first-child input {
  border-top: 0px;
  border-right: 0px;
  border-bottom: 0px;
  height: 100%;
  border-left-color: lime;
  border-left-width: thick;
}

.leaflet-routing-geocoders.osrm-directions-inputs .leaflet-routing-geocoder:last-of-type input {
  border-top: 0px;
  border-right: 0px;
  border-bottom: 0px;
  height: 100%;
  border-left-color: red;
  border-left-width: thick;
}

.leaflet-routing-geocoders.osrm-directions-inputs .leaflet-routing-geocoder input {
  border-top: 0px;
  border-right: 0px;
  border-bottom: 0px;
  height: 100%;
  border-left-color: white;
  border-left-width: thick;
}

.osrm-directions-inputs input {
  font-size: 12px;
  width: 90%;
  background-color: transparent;
  color: rgba(0, 0, 0, 0.5);
  height: 30px;
  padding: 10px 10px 10px 20px;
}

.osrm-directions-route-summary {
    display: none;
}

.osrm-directions-route-active .osrm-directions-route-summary {
    display: block;
}


.osrm-directions-instructions .osrm-directions-icon {
    position: absolute;
    left: 10px;
    top: 25px;
    margin: auto;
}

.osrm-continue-icon         { background-position: 0 0; }
.osrm-sharp-right-icon      { background-position: -20px 0; }
.osrm-turn-right-icon       { background-position: -40px 0; }
.osrm-bear-right-icon       { background-position: -60px 0; }
.osrm-u-turn-icon           { background-position: -80px 0; }
.osrm-sharp-left-icon       { background-position: -100px 0; }
.osrm-turn-left-icon        { background-position: -120px 0; }
.osrm-bear-left-icon        { background-position: -140px 0; }
.osrm-depart-icon           {
	background-position: -160px -1;
	background-color: #87DE9F;
}
.osrm-enter-roundabout-icon { background-position: -180px 0; }
.osrm-arrive-icon           {
	background-position: -200px 0;
	background-color: #DB5C0A;
}
.osrm-close-icon            { background-position: -220px 0; }
.osrm-reverse-icon          { background-position: -240px 0; }
.osrm-error-icon            { background-position: -260px 0; }

.osrm-marker-drag-icon {
    display: block;
    background-color: #444;
    border-radius: 50%;
    box-shadow: 0 0 5px 0 rgba(0,0,0,0.5);
}

.osrm-marker-drag-icon-step {
    background-color: #3BB2D0;
}

.leaflet-osrm-tools-container
{
   width: auto;
   text-align: justify;
   padding: 2px 4px;
   z-index: 8;
}

.leaflet-osrm-tools-container div
{
  vertical-align: middle;
  display: inline-block;
  cursor: pointer;
  padding: 2px 0px;
}
.leaflet-osrm-tools-container span:hover
{
   background-color: rgba(255, 255, 255, 0.2);
}
.leaflet-osrm-tools-container span[disabled],
.leaflet-osrm-tools-container span[disabled]:hover
{
   background-color: transparent;
   cursor: default;
   opacity: 0.5;
}


.osrm-directions-steps {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;
}

.osrm-directions-step {
    position: relative;
    color: rgba(255,255,255,.75);
    cursor: pointer;
    padding: 20px 20px 20px 40px;
    font-size: 20px;
    line-height: 25px;
}

.osrm-directions-step-distance {
    color: rgba(255,255,255,.5);
    position: absolute;
    padding: 5px 10px;
    font-size: 12px;
    left: 30px;
    bottom: -15px;
}

.osrm-directions-step:hover {
    color: white;
}

.osrm-directions-step:after {
    content: "";
    position: absolute;
    top: 50px;
    bottom: -20px;
    border-left: 2px dotted rgba(255,255,255,.2);
    left: 20px;
}

.osrm-directions-step:last-child:after,
.osrm-directions-step:last-child .osrm-directions-step-distance {
    display: none;
}


.osrm-directions-summary
{
  color: rgba(37,72,127, 0.8);
}

.leaflet-routing-alt.osrm-directions-instructions.leaflet-routing-alt-minimized
{
  display: none;
}

.leaflet-routing-alt-minimized .osrm-directions-summary
{
  color: rgba(37,72,127, 0.8);
  padding-top: 80px;
}

.leaflet-routing-alt table td,
.leaflet-routing-alt table {
  color: rgba(37,72,127, 0.8);
  margin-top: 20px;
  padding: 5px;
  padding-bottom: 10px;
  padding-left: 10px;
  font-weight: 400;
  font-size: 14px;
}

.leaflet-routing-alt-minimized table td,
.leaflet-routing-alt-minimized table {
  color: rgba(37,72,127, 0.8);
  margin-top: 20px;
  padding: 5px;
  padding-bottom: 10px;
  padding-left: 10px;
  font-weight: 400;
  font-size: 14px;
}

.osrm-directions-summary h2
{
  font-size: 19px;
  font-weight: bold;
  line-height: 22px;
  margin-right: 15px;
}
.osrm-directions-summary h3
{
  font-weight: normal;
}

.leaflet-osrm-geocoder-label
{
  width: 20px;
  height: 20px;
  font-family: Arial;
  font-variant: bold;
  font-size: 20px;
  color: #fff;
}

.leaflet-routing-alt table td:hover {
  cursor: pointer;
	background-color: white;
}

.leaflet-routing-alt table tr:hover {
	background-color: white;
}

td.distance {
  min-width: 60px;
}

.leaflet-routing-icon {
    background-image: url('../images/osrm.directions.icons.color.svg');
    -webkit-background-size: 455px 20px;
    background-size: 455px 20px;
    background-repeat: no-repeat;
    margin: 0;
    content: '';
    display: inline-block;
    vertical-align: top;
    width: 20px;
    height: 20px;
}

.leaflet-routing-alt-minimized .leaflet-routing-icon {
    background-image: url('../images/osrm.directions.icons.color.svg');
}

.leaflet-routing-icon-continue         { background-position: 2px 0px; }
.leaflet-routing-icon-sharp-right      { background-position: -24px 0px; }
.leaflet-routing-icon-turn-right       { background-position: -50px 0px; }
.leaflet-routing-icon-bear-right       { background-position: -74px 0px; }
.leaflet-routing-icon-u-turn           { background-position: -101px 0px; }
.leaflet-routing-icon-sharp-left       { background-position: -127px 0px; }
.leaflet-routing-icon-turn-left        { background-position: -150px 0px; }
.leaflet-routing-icon-bear-left        { background-position: -175px 0px; }
.leaflet-routing-icon-depart           { background-position: -202px 0px; }
.leaflet-routing-icon-enter-roundabout { background-position: -227px 0px; }
.leaflet-routing-icon-arrive           { background-position: -253px 0px; }
.leaflet-routing-icon-via              { background-position: -278px 0px; }
.leaflet-routing-icon-fork             { background-position: -305px 0px; }
.leaflet-routing-icon-ramp-right       { background-position: -331px 0px; }
.leaflet-routing-icon-ramp-left        { background-position: -352px 0px; }
.leaflet-routing-icon-merge-left       { background-position: -376px 0px; }
.leaflet-routing-icon-merge-right      { background-position: -403px 0px; }
.leaflet-routing-icon-end              { background-position: -429px 0px; }


.osrm-lane-icon {
  background-image: url('../images/osrm.lanes.icons.svg');
  -webkit-background-size: 180px 20px;
  background-size: 180px 20px;
  background-repeat: no-repeat;
  margin: 3px 0 0 0;
  content: '';
  display: inline-block;
  vertical-align: top;
  width: 20px;
  height: 20px;
}

.osrm-lane-icon.invalid {
  opacity: 0.5;
}

.osrm-lane-icon.straight      { background-position: 0px 0px; }
.osrm-lane-icon.left          { background-position: -20px 0px; }
.osrm-lane-icon.sharp-left    { background-position: -40px 0px; }
.osrm-lane-icon.slight-left   { background-position: -60px 0px; }
.osrm-lane-icon.uturn         { background-position: -80px 0px; }
.osrm-lane-icon.uturn-right   { background-position: -100px 0px; }
.osrm-lane-icon.slight-right  { background-position: -120px 0px; }
.osrm-lane-icon.sharp-right   { background-position: -140px 0px; }
.osrm-lane-icon.right         { background-position: -160px 0px; }


.osrm-form-label {
  cursor: default;
}

.osrm-directions-origin .osrm-form-label {
    background-color: #ee8a65;
}
.osrm-directions-via {
    background-color: white;
    position: relative;
}
.osrm-directions-via .osrm-form-label {
    background-color: #CCC;
}

.osrm-directions-via input {
    border-top: 1px solid rgba(0,0,0,.1);
}

/* Leaflet marker labels */
.leaflet-label {
  background: rgb(235, 235, 235);
  background: rgba(235, 235, 235, 0.81);
  background-clip: padding-box;
  border-color: #777;
  border-color: rgba(0,0,0,0.25);
  border-radius: 4px;
  border-style: solid;
  border-width: 4px;
  color: #111;
  display: block;
  font: 12px/20px "Helvetica Neue", Arial, Helvetica, sans-serif;
  font-weight: bold;
  padding: 1px 6px;
  position: absolute;
  -webkit-user-select: none;
     -moz-user-select: none;
      -ms-user-select: none;
          user-select: none;
  pointer-events: none;
  white-space: nowrap;
  z-index: 6;
}

.leaflet-label.leaflet-clickable {
  cursor: pointer;
  pointer-events: auto;
}

.leaflet-label:before,
.leaflet-label:after {
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  content: none;
  position: absolute;
  top: 5px;
}

.leaflet-label:before {
  border-right: 6px solid black;
  border-right-color: inherit;
  left: -10px;
}

.leaflet-label:after {
  border-left: 6px solid black;
  border-left-color: inherit;
  right: -10px;
}

.leaflet-label-right:before,
.leaflet-label-left:after {
  content: "";
}


/* Small Screen Layout
------------------------------------------------------- */
@media only screen and (max-width:880px) {
  .osrm-directions-summary {
    background-image: url('../images/osrm_logo.svg');
    -webkit-background-size: 200px 45px;
    background-size: 200px 45px;
    background-repeat: no-repeat;
    margin: 0;
    padding-top: 40px;
    padding-left: 5px;
    background-position: -50px -5px;
  }
  .osrm-directions-summary h2 {
    font-size: 15px;
    font-weight: bold;
    line-height: 18px;
    margin-right: 15px;
  }
  .leaflet-routing-container.dark {
    z-index: 10;
    background: none repeat scroll 0% 0% rgba(255, 255, 255, 0.85);
    top: 0px;
    right: 0px;
    bottom: 0px;
    margin: 0px !important;
    max-width: 58%;
    min-width: 48%;
  }
  .leaflet-routing-alt table td, .leaflet-routing-alt table {
    margin-top: 20px;
    padding: 5px;
    padding-bottom: 10px;
    margin-left: 0%;
    max-width: 95%;
  }
  .leaflet-routing-alternatives-container {
    position: fixed;
    right: 0px;
    top: 10px;
    width: 45%;
    max-width: 55%;
    min-width: 45%;
    height: 100%;
    overflow: scroll;
  }
  .leaflet-bottom .leaflet-control {
    margin-bottom: 0px;
  }
.leaflet-control-zoom {
  position: absolute;
  left: 10px;
  top: 60px;
  display: block;
 }
}

/*
  geocoding autocomplete styling
  copied over from leaflet-routing-machine.css
*/
.leaflet-routing-geocoder-result {
    font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
    position: absolute;
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s ease;
    z-index: 1000; /* Arbitrary, but try to be above "most" things. */
}

.leaflet-routing-geocoder-result table {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 0 0 4px 4px;
    background-color: white;
    cursor: pointer;
}

.leaflet-routing-geocoder-result-open {
    max-height: 800px;
}

.leaflet-routing-geocoder-selected, .leaflet-routing-geocoder-result tr:hover {
    background-color: #eee;
}

.leaflet-routing-geocoder-no-results {
    font-style: italic;
    color: #888;
}


/* Адаптивность для панелей управления */
@media only screen and (max-width: 768px) {
  .user-panel {
    top: 15px;
    right: 15px;
    padding: 8px 15px;
    font-size: 14px;
  }
  
  .circle-controls {
    top: 80px;
    right: 15px;
    padding: 10px;
    gap: 8px;
    min-width: 60px;
  }
  
  
  .info-panel {
    bottom: 15px;
    right: 15px;
    max-width: 280px;
    min-width: 220px;
  }
  
  .control-btn {
    width: 45px;
    height: 45px;
    font-size: 20px;
  }
}

/* Адаптивность для очень маленьких экранов */
@media only screen and (max-width: 480px) {
  .user-panel {
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    font-size: 12px;
  }
  
  .circle-controls {
    top: 70px;
    right: 10px;
    padding: 8px;
    gap: 6px;
    min-width: 50px;
  }
  
  
  .info-panel {
    bottom: 10px;
    right: 10px;
    max-width: 250px;
    min-width: 200px;
  }
  
  .control-btn {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}

/* Mobile Layout
------------------------------------------------------- */
@media only screen and (max-width:400px) {
.osrm-directions-summary {
  background-image: url('../images/osrm_logo.svg');
  -webkit-background-size: 200px 45px;
  background-size: 200px 45px;
  background-repeat: no-repeat;
  margin: 0;
  padding-top: 40px;
  padding-left: 32px;
  margin-left: 20px;
  background-position: -45px -5px;
}
.osrm-directions-summary h2 {
  font-size: 15px;
  font-weight: bold;
  line-height: 18px;
  margin-left: -25px;
}

.osrm-directions-summary h3 {
  font-size: 12px;
  margin-left: -25px;
}

.osrm-directions-inputs input {
  width: 70%;
}

.osrm-directions-inputs {
  min-width: 175px;
}

.leaflet-routing-remove-waypoint:after {
  margin-left: 19px;
}

.leaflet-routing-container.dark {
  z-index: 10;
  background: none repeat scroll 0% 0% rgba(255, 255, 255, 0.85);
  top: 0px;
  right: 0px;
  bottom: 0px;
  margin: 0px !important;
  max-width: 58%;
  min-width: 40%;
}
  
.leaflet-routing-alt table td, .leaflet-routing-alt table {
    margin-top: 10px;
    padding-bottom: 0px;
    margin-left: 12px;
    max-width: 95%;
    font-size: 11px;
    line-height: 16px;
}

.leaflet-routing-alt .osrm-directions-instructions, 
.leaflet-routing-alternatives-container {
    position: fixed;
    right: 0px;
    top: 10px;
    width: 45%;
    max-width: 55%;
    min-width: 20%;
    height: 100%;
    overflow: scroll;
}
.leaflet-left .leaflet-control {
  margin-left: 10px;
}

.leaflet-control {
  margin-bottom: 0px;
}

.leaflet-routing-alt table td:hover,
.leaflet-routing-alt table tr:hover {
  border-left-width: 1px;
}

}

.leaflet-routing-collapse-btn {
    position: fixed;
    top: 10px;
    right: 10px;
    background-color: rgba(37, 72, 127, 0.74902);
    width: 36px;
    height: 36px;
    display: flex;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    font-size: 18px;
    justify-content:center;
    align-items: center;
    color: white;
    z-index: 50;
}

.leaflet-routing-collapse-btn:after {
    content: '\203a';
}

.leaflet-routing-container-hide .leaflet-routing-collapse-btn:after {
    content: '\2039';
}

.leaflet-routing-container-hide.dark, .leaflet-routing-container-hide .leaflet-routing-alternatives-container {
    margin-right: -400px !important;
    transition: 0.5s;
}
