.bakhtech-mp-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(209, 168, 102, 0.2), transparent 34%),
    rgba(18, 16, 14, 0.68);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.bakhtech-mp-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.bakhtech-mp-dialog {
  position: relative;
  width: fit-content;
  max-width: min(920px, 100%);
  padding-bottom: 92px;
}

.bakhtech-mp-modal {
  position: relative;
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 241, 234, 0.92));
  box-shadow: 0 34px 80px rgba(15, 10, 6, 0.32);
  transform: translateY(18px) scale(0.98);
  transition: transform 240ms ease;
}

.bakhtech-mp-overlay.is-visible .bakhtech-mp-modal {
  transform: translateY(0) scale(1);
}

.bakhtech-mp-modal.no-image {
  grid-template-columns: minmax(0, 1fr);
  max-width: 620px;
}

.bakhtech-mp-modal.image-only {
  grid-template-columns: minmax(0, 1fr);
  max-width: 460px;
}

.bakhtech-mp-media {
  position: relative;
  min-height: 100%;
  background: linear-gradient(180deg, #d7c0a0 0%, #8c6844 100%);
}

.bakhtech-mp-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 14, 11, 0.06), rgba(17, 14, 11, 0.28));
}

.bakhtech-mp-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
}

.bakhtech-mp-modal.image-only .bakhtech-mp-media {
  min-height: 0;
}

.bakhtech-mp-modal.image-only .bakhtech-mp-media img {
  height: auto;
  min-height: 0;
}

.bakhtech-mp-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 42px 38px 36px;
}

.bakhtech-mp-title {
  margin: 0;
  color: #1c1813;
  font-size: clamp(1.8rem, 2.6vw, 2.8rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 600;
}

.bakhtech-mp-copy {
  color: #5d5348;
  font-size: 1rem;
  line-height: 1.75;
}

.bakhtech-mp-copy p {
  margin: 0;
}

.bakhtech-mp-copy p + p {
  margin-top: 12px;
}

.bakhtech-mp-button {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #17120d 0%, #6f4d2d 100%);
  color: #fff7ed;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
  box-shadow: 0 14px 30px rgba(42, 27, 11, 0.18);
}

.bakhtech-mp-button:hover,
.bakhtech-mp-button:focus {
  color: #fff7ed;
  opacity: 0.96;
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(42, 27, 11, 0.22);
}

.bakhtech-mp-close {
  position: absolute;
  left: 50%;
  bottom: 14px;
  width: 58px !important;
  height: 58px !important;
  min-width: 58px !important;
  min-height: 58px !important;
  max-width: 58px !important;
  max-height: 58px !important;
  padding: 0 !important;
  border: 0;
  border-radius: 50% !important;
  background: #ffffff;
  color: #111111;
  font-size: 1.7rem;
  line-height: 1;
  display: grid;
  place-items: center;
  appearance: none;
  -webkit-appearance: none;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  text-align: center;
  flex: 0 0 auto;
  cursor: pointer;
  box-shadow: 0 16px 32px rgba(15, 10, 6, 0.22);
  transform: translateX(-50%);
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
  z-index: 2;
}

.bakhtech-mp-close:hover,
.bakhtech-mp-close:focus {
  background: #f4f4f4;
  box-shadow: 0 20px 36px rgba(15, 10, 6, 0.28);
  transform: translateX(-50%) translateY(-2px);
}

html.bakhtech-mp-open,
body.bakhtech-mp-open {
  overflow: hidden;
}

@media (max-width: 820px) {
  .bakhtech-mp-overlay {
    padding: 18px;
  }

  .bakhtech-mp-dialog {
    padding-bottom: 84px;
  }

  .bakhtech-mp-modal {
    grid-template-columns: minmax(0, 1fr);
    max-width: 560px;
  }

  .bakhtech-mp-media {
    min-height: 260px;
  }

  .bakhtech-mp-content {
    padding: 30px 24px 24px;
  }

  .bakhtech-mp-title {
    font-size: clamp(1.6rem, 8vw, 2.2rem);
  }
}

@media (max-width: 520px) {
  .bakhtech-mp-overlay {
    padding: 12px;
  }

  .bakhtech-mp-dialog {
    padding-bottom: 78px;
  }

  .bakhtech-mp-modal {
    border-radius: 22px;
  }

  .bakhtech-mp-media {
    min-height: 220px;
  }

  .bakhtech-mp-content {
    gap: 14px;
    padding: 24px 18px 20px;
  }

  .bakhtech-mp-button {
    width: 100%;
  }

  .bakhtech-mp-close {
    width: 54px !important;
    height: 54px !important;
    min-width: 54px !important;
    min-height: 54px !important;
    max-width: 54px !important;
    max-height: 54px !important;
    font-size: 1.55rem;
  }
}
