/* Atlas Map — панель слоёв и тем (миниатюры-градиенты), переключатели, кнопка 2D/3D, компас всегда виден. */

.mapbtn.compass.always { display: flex; }
.mapbtn.mapbtn-3d { font-weight: 800; font-size: 13px; letter-spacing: .02em; }
.mapbtn.mapbtn-3d.active { color: var(--blue); }
.mapbtn-3d-text { line-height: 1; }

.layers-panel { position: fixed; z-index: 60; width: 340px; max-width: calc(100vw - 16px); padding: 10px 12px 12px; background: var(--panel); color: var(--text); border-radius: 14px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.layers-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 0 6px 4px; }
.layers-head h3 { font-size: 15px; font-weight: 700; }
.layers-head .iconbtn { width: 34px; height: 34px; }
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.theme-tile { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 6px 4px 7px; border-radius: 12px; border: 2px solid transparent; background: var(--panel-2); color: var(--text); font-size: 12.5px; font-weight: 600; position: relative; transition: border-color .15s, background .15s; }
.theme-tile:hover { background: var(--hover); }
.theme-tile.active { border-color: var(--blue); }
.theme-tile.active .theme-label { color: var(--blue); }
.theme-auto { position: absolute; top: 4px; right: 6px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #fff; background: var(--blue); border-radius: 6px; padding: 1px 5px; }
.theme-thumb { width: 100%; height: 52px; border-radius: 8px; border: 1px solid rgba(0, 0, 0, .08); background-color: #eee; position: relative; overflow: hidden; }
.theme-thumb::after { content: ""; position: absolute; left: -10%; right: -10%; top: 46%; height: 6px; transform: rotate(-14deg); border-radius: 3px; }
.theme-thumb.light { background: linear-gradient(135deg, #f8f4f0 0%, #f8f4f0 45%, #9ebdff 46%, #9ebdff 62%, #d8e8c8 63%, #f8f4f0 100%); }
.theme-thumb.light::after { background: #fc8; box-shadow: 0 0 0 1.5px #e9ac77; }
.theme-thumb.night { background: linear-gradient(135deg, #0b1220 0%, #0b1220 45%, #0f1e3a 46%, #0f1e3a 62%, #102418 63%, #0b1220 100%); border-color: rgba(255, 255, 255, .1); }
.theme-thumb.night::after { background: #5b74ad; box-shadow: 0 0 0 1.5px #2a3a63; }
.theme-thumb.classic { background: linear-gradient(135deg, #f0f0ee 0%, #f0f0ee 45%, #cfd6dd 46%, #cfd6dd 62%, #e3e7de 63%, #f0f0ee 100%); }
.theme-thumb.classic::after { background: #fff; box-shadow: 0 0 0 1.5px #c6c6c3; }
.theme-thumb.satellite { background: radial-gradient(circle at 30% 30%, #6b7f4a 0%, #3f5a2e 35%, #2b3d2a 60%, #1e2c3a 100%); }
.theme-thumb.satellite::after { background: transparent; }
.theme-thumb.hybrid { background: radial-gradient(circle at 30% 30%, #6b7f4a 0%, #3f5a2e 35%, #2b3d2a 60%, #1e2c3a 100%); }
.theme-thumb.hybrid::after { background: rgba(255, 255, 255, .85); box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .45); }
.theme-thumb.osm { background: linear-gradient(135deg, #f2efe9 0%, #f2efe9 45%, #aad3df 46%, #aad3df 62%, #cdebb0 63%, #f2efe9 100%); }
.theme-thumb.osm::after { background: #f9b29c; box-shadow: 0 0 0 1.5px #e0a089; }
.theme-reset { display: block; margin: 8px 4px 0; font-size: 12.5px; }

.layers-toggles { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 4px; }
.layers-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; }
.layers-row > .ico { width: 22px; height: 22px; color: var(--blue); }
.layers-row-body { flex: 1; min-width: 0; }
.layers-row-title { font-size: 14px; font-weight: 600; }
.layers-row-hint { font-size: 12px; color: var(--muted); line-height: 1.3; }
.switch { position: relative; width: 44px; height: 26px; border-radius: 13px; background: var(--border); transition: background .2s; flex: none; }
.switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s; }
.switch.on { background: var(--blue); }
.switch.on i { transform: translateX(18px); }

@media (max-width: 899px) {
  .layers-panel { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); top: auto !important; width: auto; max-width: none; border-radius: 18px; }
  .theme-thumb { height: 60px; }
  .layers-row { padding: 10px 4px; }
}
