.project-popup-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  visibility: hidden;
  pointer-events: none;
  overflow: hidden;
  transition: visibility 0s 0.4s;
  padding: 2.22vh;
  background: rgba(0, 0, 0, 0.3);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.project-popup-overlay.active {
  visibility: visible;
  pointer-events: auto;
  transition: visibility 0s;
}

.project-popup {
  background-color: #141720;
  width: 130.092vh;
  max-width: 100%;
  max-height: calc(100vh - 6.66vh);
  position: relative;
  margin: 0;
  border-radius: 1.332vh;
  padding: 2.22vh 2.22vh 3.552vh;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
  display: flex;
  flex-direction: column;
  gap: 1.332vh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  transform: translateY(100vh);
  transition: transform 0.4s ease;
}

.project-popup-overlay.active .project-popup {
  transform: translateY(0);
}

.project-popup > * {
  flex-shrink: 0;
}

.project-popup::-webkit-scrollbar {
  display: none;
}

/* Заголовок и ID проекта. */
.project-popup__header {
  display: flex;
  flex-direction: column;
  gap: 0.444vh;
  align-self: stretch;
}

.project-popup__header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.332vh;
}

.project-popup__header-titles {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.444vh;
  min-width: 0;
}

.project-popup__title {
  width: 69.264vh;
  max-width: 100%;
  font-size: 2.22vh;
  font-weight: 700;
  color: #D0D0D1;
  line-height: 2.664vh;
  overflow-wrap: anywhere;
}

.project-popup__close-btn {
  background: transparent;
  border: 0;
  cursor: pointer;
  width: 2.664vh;
  height: 2.664vh;
  padding: 0;
  flex-shrink: 0;
}

.project-popup__expand-all-toggle {
  width: 2.664vh;
  height: 2.664vh;
  min-width: 2.664vh;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6F82BF;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.project-popup__expand-all-icon {
  display: block;
  width: 2.664vh;
  height: 2.664vh;
}

.project-popup__expand-all-toggle:hover {
  opacity: 0.8;
}

.project-popup__expand-all-toggle--expanded {
  transform: rotate(180deg);
}

.project-popup__close-btn:hover {
  opacity: 0.8;
}

.project-popup__close-btn:focus-visible,
.project-popup__expand-all-toggle:focus-visible,
.project-popup__corpus-header:focus-visible {
  outline: var(--app-border-width) solid #6F82BF;
  border-radius: 0.666vh;
}

.project-popup__close-icon {
  width: 2.664vh;
  height: 2.664vh;
  display: block;
}

.project-popup__id {
  width: 73.26vh;
  max-width: 100%;
  min-height: 2.664vh;
  font-size: 1.554vh;
  font-weight: 500;
  color: #7B8087;
  line-height: 2.664vh;
  overflow-wrap: anywhere;
}

.project-popup__address {
  background: rgba(247, 241, 236, 0.06);
  border-radius: 1.332vh;
  outline: var(--app-border-width) solid rgba(247, 241, 236, 0.08);
  outline-offset: calc(-1 * var(--app-border-width));
  padding: 1.332vh;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.444vh;
}

.project-popup__address-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 0;
  min-height: 5.328vh;
  padding: 1.332vh;
  box-sizing: content-box;
  justify-content: center;
}

.project-popup__address-label {
  font-size: 1.554vh;
  font-weight: 500;
  color: #7B8087;
  line-height: 2.664vh;
}

.project-popup__address-value {
  font-size: 1.776vh;
  font-weight: 500;
  color: #D0D0D1;
  line-height: 2.664vh;
  overflow-wrap: anywhere;
}

/* Список корпусов. */
.project-popup__body {
  display: flex;
  flex-direction: column;
  gap: 1.332vh;
  min-width: 0;
}

/* Карточка корпуса. */
.project-popup__corpus {
  background: rgba(247, 241, 236, 0.06);
  border-radius: 1.332vh;
  outline: var(--app-border-width) solid rgba(247, 241, 236, 0.08);
  outline-offset: calc(-1 * var(--app-border-width));
  padding: 2.664vh;
  height: max-content;
}

.project-popup__corpus-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  margin-bottom: 0;
}

.project-popup__corpus-header:hover .project-popup__corpus-title {
  opacity: 0.9;
}

.project-popup__corpus--collapsed .project-popup__corpus-header {
  margin-bottom: 0;
}

.project-popup__corpus-title {
  display: block;
  width: 13.32vh;
  max-width: 100%;
  font-size: 1.776vh;
  font-weight: 700;
  color: #D0D0D1;
  line-height: 2.664vh;
  margin: 0;
  overflow-wrap: anywhere;
}

.project-popup__corpus-content {
  width: 120.324vh;
  max-width: 100%;
  margin-top: 1.332vh;
  display: flex;
  flex-direction: column;
  gap: 2.22vh;
}

.project-popup__corpus--collapsed .project-popup__corpus-content {
  display: none;
}

/* Секция корпуса. */
.project-popup__section {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 1.332vh;
}

.project-popup__section-title {
  width: 11.1vh;
  max-width: 100%;
  font-size: 1.776vh;
  font-weight: 500;
  color: #6F82BF;
  line-height: 2.664vh;
  display: flex;
  margin-bottom: 0;
}

.project-popup__metric-title {
  font-size: 1.776vh;
  font-weight: 500;
  color: #D0D0D1;
  line-height: 2.664vh;
  margin-bottom: 0.444vh;
}

.project-popup__metric-grid {
  display: flex;
  flex-direction: row;
  gap: 2.22vh;
  margin-bottom: 0;
}

.project-popup__metric-item {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-width: 0;
  min-height: 5.328vh;
}

.project-popup__metric-label {
  width: 35.409vh;
  max-width: 100%;
  font-size: 1.554vh;
  font-weight: 500;
  color: #7B8087;
  line-height: 2.664vh;
}

.project-popup__metric-value {
  width: 35.409vh;
  max-width: 100%;
  font-size: 1.776vh;
  font-weight: 500;
  color: #D0D0D1;
  line-height: 2.664vh;
  overflow-wrap: anywhere;
}

/* Типовые этажи. */
.project-popup__types {
  display: flex;
  flex-direction: column;
  gap: 0.444vh;
}

.project-popup__types-title {
  font-size: 1.776vh;
  font-weight: 500;
  color: #D0D0D1;
  line-height: 2.664vh;
}

.project-popup__types-grid {
  display: flex;
  flex-direction: row;
  gap: 2.22vh;
  margin-bottom: 0;
}

.project-popup__types-item {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-width: 0;
  min-height: 5.328vh;
}

.project-popup__corpus:first-child .project-popup__section:first-child .project-popup__types-grid {
  gap: 1.332vh;
}

.project-popup__types-label {
  width: 35.409vh;
  max-width: 100%;
  font-size: 1.554vh;
  font-weight: 500;
  color: #7B8087;
  line-height: 2.664vh;
}

/* Квартиры */
.project-popup__flats {
  width: 100%;
  margin-bottom: 0;
}

.project-popup__flats-label {
  width: 35.409vh;
  max-width: 100%;
  font-size: 1.554vh;
  font-weight: 500;
  color: #7B8087;
  line-height: 2.664vh;
}

.project-popup__flats-value {
  width: 35.409vh;
  max-width: 100%;
  font-size: 1.776vh;
  font-weight: 500;
  color: #D0D0D1;
  line-height: 2.664vh;
}

.project-popup__tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.888vh;
  font-size: 1.554vh;
  font-weight: 500;
  color: #6F82BF;
  line-height: 1.998vh;
  border-radius: 0.888vh;
  border: 0;
  outline: var(--app-border-width) solid #6F82BF;
  outline-offset: -0.0555vh;
  width: 13.986vh;
  max-width: 100%;
  min-height: 3.552vh;
  padding: 0.777vh 0.888vh;
  text-align: center;
}
