* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #171717;
  background: #f6f6f6;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  height: 72px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid #e9e9e9;
  z-index: 1000;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  width: 43px;
  height: 43px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: white;
  background: #111;
}

.brand-title {
  font-size: 17px;
  line-height: 20px;
  font-weight: 750;
}

.brand-city {
  margin-top: 2px;
  font-size: 13px;
  color: #888;
}

.add-button {
  height: 42px;
  padding: 0 17px;
  border: 0;
  border-radius: 13px;
  background: #171717;
  color: white;
  font-weight: 650;
}

.add-button span {
  margin-right: 5px;
}

.toolbar {
  padding: 12px 18px;
  display: flex;
  gap: 12px;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #ececec;
  z-index: 900;
}

.search {
  width: 260px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  background: #f3f3f3;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
}

.search span {
  font-size: 20px;
  color: #777;
}

.search input {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
}

.filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filters::-webkit-scrollbar {
  display: none;
}

.filter {
  height: 38px;
  white-space: nowrap;
  padding: 0 15px;
  border-radius: 12px;
  border: 1px solid #e3e3e3;
  background: white;
  color: #444;
}

.filter.active {
  color: white;
  background: #171717;
  border-color: #171717;
}

.content {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
}

.map-wrap {
  position: relative;
  min-width: 0;
}

#map {
  position: absolute;
  inset: 0;
}

.geo-button {
  position: absolute;
  right: 18px;
  bottom: 24px;
  z-index: 500;
  width: 48px;
  height: 48px;
  background: #fff;
  border: 0;
  border-radius: 15px;
  box-shadow: 0 5px 22px rgba(0,0,0,.16);
  font-size: 24px;
}

.sidebar {
  min-width: 0;
  padding: 23px 18px;
  background: #fff;
  border-left: 1px solid #e9e9e9;
  overflow-y: auto;
}

.sidebar-head h1 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -.5px;
}

.sidebar-head p {
  margin: 5px 0 18px;
  color: #8a8a8a;
  font-size: 14px;
}

.event-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.event-card {
  padding: 15px;
  border: 1px solid #e9e9e9;
  border-radius: 17px;
  background: white;
  transition: .18s ease;
}

.event-card:hover {
  transform: translateY(-1px);
  border-color: #ccc;
  box-shadow: 0 7px 24px rgba(0,0,0,.06);
}

.event-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #767676;
  font-size: 12px;
}

.event-category {
  padding: 5px 8px;
  border-radius: 8px;
  background: #f3f3f3;
  color: #555;
}

.event-card h2 {
  margin: 11px 0 7px;
  font-size: 17px;
  line-height: 1.27;
}

.event-place {
  font-size: 13px;
  color: #747474;
}

.event-price {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
}

.event-marker {
  width: 38px;
  height: 38px;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: #111;
  transform: rotate(-45deg);
  box-shadow: 0 3px 13px rgba(0,0,0,.25);
}

.event-marker-inner {
  width: 100%;
  height: 100%;
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
}

.leaflet-popup-content-wrapper {
  border-radius: 14px;
}

.leaflet-popup-content {
  margin: 14px 15px;
}

.popup-title {
  font-weight: 750;
  font-size: 15px;
  margin-bottom: 5px;
}

.popup-text {
  color: #666;
  font-size: 13px;
}

@media (max-width: 800px) {
  .header {
    height: 62px;
    padding: 0 13px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  .brand-title {
    font-size: 15px;
  }

  .add-button {
    width: 42px;
    padding: 0;
    font-size: 0;
  }

  .add-button span {
    margin: 0;
    font-size: 22px;
  }

  .toolbar {
    display: block;
    padding: 9px 10px 10px;
  }

  .search {
    width: 100%;
    margin-bottom: 9px;
  }

  .content {
    position: relative;
    display: block;
  }

  .map-wrap {
    position: absolute;
    inset: 0;
  }

  .sidebar {
    position: absolute;
    z-index: 600;
    left: 10px;
    right: 10px;
    bottom: 10px;
    max-height: 38%;
    padding: 14px;
    border: 0;
    border-radius: 20px;
    box-shadow: 0 4px 25px rgba(0,0,0,.18);
  }

  .sidebar-head h1 {
    font-size: 19px;
  }

  .sidebar-head p {
    margin-bottom: 10px;
  }

  .event-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 84%;
    overflow-x: auto;
    gap: 9px;
  }

  .event-card {
    min-width: 0;
  }

  .geo-button {
    right: 14px;
    bottom: calc(38% + 22px);
  }
}
