/* MyMappi v707 — keep Archive settings readable above the Memory Lane cards. */

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-overview {
  position: relative !important;
  z-index: 1 !important;
  overflow: visible !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-overview:has(.memory-lane-tools[open]) {
  z-index: 220 !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-overview-footer,
html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-tools[open] {
  position: relative !important;
  z-index: 221 !important;
  overflow: visible !important;
}

html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-tools-panel {
  z-index: 222 !important;
}

@media (max-width: 760px) {
  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-overview-footer {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 9px 12px !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-tools[open] {
    grid-column: 1 / -1 !important;
    display: grid !important;
    width: 100% !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-tools[open] > summary {
    justify-self: end !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-tools-panel {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 4px !important;
  }
}

@media (max-width: 360px) {
  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-overview-footer {
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: start !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-tools,
  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-tools[open] {
    grid-column: 1 !important;
    justify-self: stretch !important;
  }

  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-tools > summary,
  html body main.app-shell > section.map-stage.memories-focus > section.memory-database-page.side-panel #memoryList .memory-lane-tools[open] > summary {
    justify-self: start !important;
  }
}
