* {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  touch-action: manipulation;
}
.ymaps-2-1-79-copyrights-pane {
  display: none !important;
}
body {
  font-family: "Comfortaa", sans-serif;
  margin: 0;
  padding: 0;
  background-color: #aaa;
  color: #333;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.dark-theme #map [class$="ground-pane"] {
  filter: invert(75%) hue-rotate(180deg) brightness(100%) contrast(150%);
}
.dark-theme {
  background-color: #1e1e1e;
  color: #ffffff;
}
.dark-theme .container > div {
  background-color: #3d3d3d;
  color: #ffffff;
}
.dark-theme .info-box {
  background-color: #3d3d3d;
  border-color: #1e1e1e;
}
h1,
h2 {
  color: #007bff;
  font-size: 1.5em;
  margin-bottom: 10px;
  margin-top: 10px;
  text-align: left;
}
#map {
  display: flex;
}
body.type-polygon #map {
  cursor: pointer;
}
body.type-marker #map {
  cursor: default;
}
.info-box {
  margin-top: 10px;
  background: #fff;
  padding: 12px 15px;
  border: 1px solid #aaa;
  border-radius: 10px;
  border-left-width: thick;
}
div > .info-box {
  flex: 1;
}
.info-box p {
  width: 100%;
  margin: 0;
  font-size: 16px;
  word-break: break-all;
}
.long-p {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
button,
input {
  min-height: 40px;
  font-family: "Comfortaa", sans-serif;
}
.button-group {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.button-group button {
  padding: 10px;
  border: none;
  border-radius: 10px;
  background-color: #007bff;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.button-group button:hover {
  background-color: #0056b3;
}
.theme-button {
  background-color: #007bff;
  color: white;
  padding: 10px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}
.theme-button:hover {
  background-color: #0056b3;
}
p.description {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 10px;
}
.dark-theme p.description {
  color: #ccc;
}
#apartment-list {
  list-style-type: none;
  padding: 0;
  margin: 0;
}
#apartment-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#apartment-list li p {
  background: var(--list-item-bg);
  border-radius: 10px;
  border: 1px solid var(--list-item-border);
  padding: 10px;
  margin: 0;
  margin-bottom: 10px;
  flex: 1;
  justify-content: space-between;
  align-items: center;
  color: var(--text-color);
  border-left-width: thick;
}
#apartment-list li button {
  margin-left: 10px;
  margin-bottom: 10px;
  padding: 5px 10px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background-color: var(--button-bg);
  color: var(--button-text);
  transition: background-color 0.3s ease;
  width: 40px;
  height: 40px;
}
.add-button {
  background-color: #28a745 !important;
  color: white;
  padding: 10px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  width: 100%;
  transition: background-color 0.3s ease;
}
.add-button:hover {
  background-color: #218838 !important;
}
.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: blur(10px);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.popup-content {
  background: var(--popup-bg);
  padding: 20px;
  border-radius: 10px;
  width: 80%;
  max-width: 400px;
  color: var(--text-color);
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}
.popup-content input {
  width: 100%;
  padding: 0px 10px;
  border: 1px solid #aaa;
  border-radius: 10px;
  border-left-width: thick;
  font-size: 1em;
  margin-bottom: 5px;
  background-color: var(--input-bg);
  color: var(--text-color);
}
.popup-content .button-group button {
  flex: 1;
  padding: 10px 15px;
  border: none;
  border-radius: 10px;
  background-color: var(--button-bg);
  color: var(--button-text);
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.save-button {
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background-color: #28a745 !important;
  color: var(--button-text);
}
.save-button:hover {
  background-color: #218838 !important;
  color: white !important;
}
.delete-button {
  background-color: #e74c3c !important;
  color: var(--button-text);
  width: 100%;
  padding: 10px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}
.delete-button:hover {
  background-color: #c0392b !important;
  color: white !important;
}
:root {
  --button-bg: #007bff;
  --button-text: white;
  --popup-bg: #fff;
  --input-bg: #fff;
  --text-color: #333;
  --list-item-bg: #fff;
  --list-item-border: #aaa;
}
.dark-theme {
  --button-bg: #007bff;
  --button-text: white;
  --popup-bg: #3d3d3d;
  --input-bg: #3d3d3d;
  --text-color: #ffffff;
  --list-item-bg: #3d3d3d;
  --list-item-border: #1e1e1e;
}
.dark-theme .popup-content input {
  border-color: #1e1e1e;
  background-color: #3d3d3d;
  color: #ffffff;
}
body,
html {
  height: 100%;
  width: 100%;
  overflow: hidden;
  position: relative;
}
#map {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.top-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: calc(100% - 40px);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  pointer-events: none;
}
.top-overlay > * {
  pointer-events: auto;
}
.top-overlay .logo-container img {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  background-color: white;
}
.top-overlay .map-link-button {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  border: none;
  background-color: var(--button-bg);
  color: white;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
.top-overlay .map-link-button:hover {
  background-color: #0056b3;
}
.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 20;
  background-color: var(--popup-bg);
  color: var(--text-color);
  border-top-left-radius: 25px;
  border-top-right-radius: 25px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.2);
  height: 15vh;
  max-height: 100%;
  overflow-y: auto;
  transition: height 0.3s ease;
}
.handle {
  width: 40px;
  height: 5px;
  background-color: #aaa;
  border-radius: 10px;
  margin: 8px auto;
}
.sheet-content {
  padding: 0 20px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.6s ease-out;
}
.loading-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}
.loading-content {
  text-align: center;
  color: #333;
}
.logo-bounce {
  animation: bounce 1.5s ease-in-out infinite;
  margin-bottom: 30px;
}
.logo-bounce img {
  width: 100px;
  height: 100px;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  background: white;
}
@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}
.loading-text p {
  font-size: 1.4em;
  font-weight: bold;
  margin: 0 0 15px 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.loading-dots {
  display: inline-flex;
  gap: 8px;
}
.loading-dots span {
  width: 12px;
  height: 12px;
  background: #1e1e1e;
  border-radius: 10px;
  animation: pulse 1.4s ease-in-out infinite;
}
.loading-dots span:nth-child(1) {
  animation-delay: 0s;
}
.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}
.loading-error {
  color: #ffffff;
  background: #ff0000;
  padding: 15px 25px;
  border-radius: 10px;
  margin: 30px;
  font-size: 1.1em;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.3);
}
.dark-theme .loading-screen {
  background: #1e1e1e;
}
.dark-theme .loading-content {
  color: white;
}
.dark-theme .loading-dots span {
  background: white;
}
.dark-theme .loading-error {
  color: #1e1e1e;
}
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast-notification {
  background-color: #fff;
  border: 1px solid #007bff;
  border-left: 5px solid #007bff;
  border-radius: 10px;
  padding: 15px 20px;
  min-width: 300px;
  max-width: 400px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  animation: slideIn 0.3s ease forwards;
  font-family: "Comfortaa", sans-serif !important;
  color: #000;
  backdrop-filter: blur(5px);
  box-sizing: border-box;
}
.toast-notification.hiding {
  animation: slideOut 0.3s ease forwards;
}
.toast-content {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-right: 10px;
}
.toast-title {
  font-weight: bold;
  font-size: 1rem;
  color: #007bff;
}
.toast-message {
  font-size: 0.9rem;
  color: #333;
}
.toast-close {
  background: none;
  border: none;
  color: #aaa;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0;
  line-height: 1;
  height: auto !important;
  width: auto !important;
}
.toast-close:hover {
  color: #e74c3c;
  background: none !important;
}
.dark-theme .toast-notification {
  background-color: #3d3d3d;
  color: #fff;
}
.dark-theme .toast-message {
  color: #ccc;
}
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}
@media (max-aspect-ratio: 1/1) {
  #toast-container {
    right: 50%;
    transform: translateX(50%);
    width: 90%;
    align-items: center;
  }
  .toast-notification {
    width: 90%;
    min-width: auto;
  }
  @keyframes slideIn {
    from {
      transform: translateY(-100%);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
  @keyframes slideOut {
    from {
      transform: translateY(0);
      opacity: 1;
    }
    to {
      transform: translateY(-100%);
      opacity: 0;
    }
  }
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: #ffffff;
  border: 1px solid #aaaaaa;
  border-left-width: thick;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
  margin-bottom: 10px;
}
.dark-theme .nav-item {
  background: #3d3d3d;
  border-color: #1e1e1e;
}
.nav-item:hover {
  background-color: #aaaaaa;
  border-color: #007bff;
}
.dark-theme .nav-item:hover {
  background-color: #1e1e1e;
  border-color: #007bff;
}
.nav-item.active {
  border-color: #007bff;
  background-color: #007bff;
  color: #ffffff;
}
.dark-theme .nav-item.active {
  background-color: #007bff;
}
.nav-item i:first-child {
  font-size: 20px;
  color: #007bff;
  min-width: 24px;
}
.nav-item.active i:first-child {
  color: #ffffff;
}
.nav-item i:last-child {
  font-size: 20px;
  color: #007bff;
  margin-left: auto;
}
.nav-item.active i:last-child {
  color: #ffffff;
}
.nav-item span {
  flex: 1;
}
.feature-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.feature-btn {
  background-color: var(--input-bg);
  color: var(--text-color);
  padding: 12px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  border: 1px solid #aaa;
  border-left-width: thick;
}
.dark-theme .feature-btn {
  border-color: #1e1e1e;
}
.feature-btn:hover,
.feature-btn.active {
  color: #007bff !important;
  border-color: #007bff !important;
}
#language-list {
  margin-bottom: 20px;
}
.extra-input {
  width: 100%;
  padding: 10px;
  border: 1px solid #aaa;
  border-radius: 10px;
  border-left-width: thick;
  font-family: "Comfortaa", sans-serif;
  box-sizing: border-box;
  margin-top: 5px;
}
.char-counter {
  text-align: right;
  font-size: 0.8em;
  color: #666;
  margin-top: 5px;
}
.dark-theme .extra-input {
  border-color: #1e1e1e;
  background-color: #3d3d3d;
  color: #ffffff;
}
.dark-theme .char-counter {
  color: #ccc;
}
#toggle-input-type {
  background-color: #007bff;
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
#toggle-input-type:hover {
  background-color: #0056b3;
}
#toggle-input-type.text-mode {
  background-color: #28a745;
}
#toggle-input-type.text-mode:hover {
  background-color: #218838;
}