/* Генплан: карточка участка с подрядом + попап выбора проекта (Figma 7629:1940 / 7629:2218) */

.genplan-embed--v2 #tooltip.tooltip--lot .tooltip-img--lot {
  width: 100%;
  height: 200px;
  background:
    linear-gradient(135deg, rgba(246, 209, 0, 0.55) 0%, rgba(244, 234, 218, 0.95) 55%, #fefaf4 100%);
}

.genplan-embed--v2 #tooltip .tooltip-badge-lot {
  position: absolute;
  left: 0;
  top: 24px;
  margin: 0;
  padding: 4px 16px;
  font-family: "Cera Pro", sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 29px;
  text-transform: uppercase;
  background: #f6d100;
  color: #3c3c3b;
  z-index: 2;
}

.genplan-embed--v2 #tooltip.tooltip--lot .tooltip-footer {
  overflow: visible;
  flex-shrink: 0;
}

.genplan-embed--v2 #tooltip.tooltip--lot .tooltip-content {
  overflow: auto;
}

.genplan-embed--v2 #tooltip .tooltip-actions--lot {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  flex-shrink: 0;
}

.genplan-embed--v2 #tooltip .tooltip-footer .tooltip-actions {
  flex-shrink: 0;
}

.genplan-embed--v2 #tooltip.tooltip--lot .tooltip-more-link {
  display: none !important;
}

.genplan-embed--v2 #tooltip .tooltip-choose-project {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 16px 24px;
  border: 1px solid #765e50;
  border-radius: 54px;
  background: #fefaf4;
  color: #765e50;
  font-family: "Cera Pro", sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 32px;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
  white-space: nowrap;
  box-sizing: border-box;
}

.genplan-embed--v2 #tooltip .tooltip-choose-project:hover {
  background: #f4eada;
  color: #5f4a3f;
}

.genplan-embed--v2 #tooltip.tooltip--lot .tooltip-viewing-link {
  width: 100%;
  box-sizing: border-box;
  padding: 16px 24px;
  white-space: nowrap;
}

/* Classic fallback */
#tooltip .tooltip-choose-project {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: 1px solid #765e50;
  border-radius: 40px;
  background: #fefaf4;
  color: #765e50;
  font-family: "Cera Pro", sans-serif;
  font-weight: 500;
  font-size: 14px;
  text-transform: uppercase;
  cursor: pointer;
}

/* ── Попап выбора проекта — Figma 7629:2218 ── */
body.gp-project-modal-open {
  overflow: hidden;
}

.gp-project-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.gp-project-modal[hidden] {
  display: none !important;
}

.gp-project-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(37, 37, 37, 0.72);
}

.gp-project-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(1080px, 100%);
  max-height: min(860px, calc(100vh - 48px));
  display: flex;
  flex-direction: column;
  background: #fefaf4;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}

.gp-project-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 48px;
  height: 48px;
  border: 1px solid #917357;
  border-radius: 32px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.gp-project-modal__head {
  padding: 32px 64px 16px 32px;
  flex: 0 0 auto;
}

.gp-project-modal__title {
  margin: 0 0 8px;
  font-family: "Kudryashev Headline", Merriweather, serif;
  font-weight: 400;
  font-size: 32px;
  line-height: 1.15;
  color: #3c3c3b;
}

.gp-project-modal__subtitle {
  margin: 0;
  font-family: "Cera Pro", sans-serif;
  font-size: 16px;
  line-height: 24px;
  color: #765e50;
  max-width: 640px;
}

.gp-project-modal__body {
  padding: 8px 32px 32px;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.gp-project-modal__loading,
.gp-project-modal__empty {
  font-family: "Cera Pro", sans-serif;
  font-size: 16px;
  color: #765e50;
  padding: 24px 0;
}

.gp-project-modal__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.gp-project-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  min-width: 0;
}

.gp-project-card__media {
  display: block;
  line-height: 0;
  background: #f4eada;
}

.gp-project-card__media img,
.gp-project-card__media--empty {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.gp-project-card__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  flex: 1 1 auto;
}

.gp-project-card__title {
  margin: 0;
  font-family: "Cera Pro", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.25;
  color: #3c3c3b;
}

.gp-project-card__meta {
  margin: 0;
  font-family: "Cera Pro", sans-serif;
  font-size: 14px;
  line-height: 1.3;
  color: #917357;
}

.gp-project-card__price {
  margin: 0;
  font-family: Merriweather, serif;
  font-size: 20px;
  line-height: 1.2;
  color: #3c3c3b;
  text-transform: uppercase;
}

.gp-project-card__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}

.gp-project-card__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 20px;
  border: none;
  border-radius: 54px;
  background: #765e50;
  color: #fff !important;
  text-decoration: none !important;
  font-family: "Cera Pro", sans-serif;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
  cursor: pointer;
}

.gp-project-card__btn:hover {
  background: #5f4a3f;
}

.gp-project-card__more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #765e50 !important;
  text-decoration: none !important;
  font-family: "Cera Pro", sans-serif;
  font-size: 14px;
  text-transform: uppercase;
}

@media (max-width: 1023px) {
  .gp-project-modal {
    padding: 0;
    align-items: stretch;
  }

  .gp-project-modal__dialog {
    width: 100%;
    max-height: none;
    height: 100%;
    border-radius: 0;
  }

  .gp-project-modal__head {
    padding: 24px 64px 12px 20px;
  }

  .gp-project-modal__title {
    font-size: 24px;
  }

  .gp-project-modal__body {
    padding: 8px 20px 24px;
  }

  .gp-project-modal__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .gp-project-modal__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.gp-project-modal__form {
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 8px 0 16px;
}

.gp-project-modal__form[hidden],
.gp-project-modal__catalog[hidden],
.gp-project-modal__grid[hidden],
.gp-project-modal__empty[hidden],
.gp-project-modal__loading[hidden] {
  display: none !important;
}

.gp-project-modal__back {
  align-self: flex-start;
  border: none;
  background: none;
  padding: 0;
  color: #765e50;
  font-family: "Cera Pro", sans-serif;
  font-size: 14px;
  text-transform: uppercase;
  cursor: pointer;
}

.gp-project-modal__picked {
  margin: 0;
  font-family: "Cera Pro", sans-serif;
  font-size: 16px;
  line-height: 1.4;
  color: #3c3c3b;
}

.gp-project-modal__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gp-project-modal__field input {
  width: 100%;
  box-sizing: border-box;
  padding: 16px 20px;
  border: 1px solid #ad9170;
  border-radius: 8px;
  background: #fff;
  font-family: "Cera Pro", sans-serif;
  font-size: 16px;
  color: #3c3c3b;
}

.gp-project-modal__agree {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: "Cera Pro", sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: #3c3c3b;
}

.gp-project-modal__agree a {
  color: #765e50;
}

.gp-project-modal__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  border: none;
  border-radius: 54px;
  background: #765e50;
  color: #fff;
  font-family: "Cera Pro", sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 32px;
  text-transform: uppercase;
  cursor: pointer;
}

.gp-project-modal__submit:hover {
  background: #5f4a3f;
}

.gp-project-modal__form .popup-success {
  display: none;
  align-items: center;
  gap: 8px;
  color: #3c3c3b;
  font-family: "Cera Pro", sans-serif;
}

.gp-project-modal__form .online-notice {
  visibility: hidden;
  min-height: 16px;
  font-size: 13px;
  color: #c45c4a;
}
