.jm-cp-open {
  overflow: hidden;
}

.jm-cp__overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 40, 25, 0.45);
  box-sizing: border-box;
}

.jm-cp__dialog {
  position: relative;
  width: min(100%, 480px);
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-radius: 12px;
  background: #f4f2ed;
  box-shadow: 0 20px 60px rgba(10, 40, 25, 0.18);
}

.jm-cp__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #0a2819;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.jm-cp__close:hover,
.jm-cp__close:focus-visible {
  background: #46563b;
  color: #fff;
  transform: scale(1.05);
}

.jm-cp__body {
  padding: 24px;
}

.jm-cp__image-wrap {
  margin-bottom: 20px;
  border-radius: 8px;
  overflow: hidden;
}

.jm-cp__image {
  display: block;
  width: 100%;
  height: auto;
}

.jm-cp__fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  margin-bottom: 20px;
  border-radius: 8px;
  background: #e5e0d3;
  color: #46563b;
  font-family: Inter, Helvetica, Arial, sans-serif;
  font-size: 24px;
  font-weight: 600;
}

.jm-cp__discount,
.jm-cp__description,
.jm-cp__label {
  margin: 0 0 12px;
  font-family: Inter, Helvetica, Arial, sans-serif;
  color: #0a2819;
}

.jm-cp__discount {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.jm-cp__description,
.jm-cp__label {
  font-size: 15px;
  line-height: 1.5;
}

.jm-cp__code-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.jm-cp__code {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 2px dashed #46563b;
  border-radius: 8px;
  background: #fff;
  color: #0a2819;
  font-family: Inter, Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.jm-cp__copy {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: #46563b;
  color: #fff;
  font-family: Inter, Helvetica, Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.jm-cp__copy:hover,
.jm-cp__copy:focus-visible {
  background: #3a4830;
}

@media (max-width: 1024px) {
  .jm-cp__body {
    padding: 22px 20px 20px;
  }

  .jm-cp__close {
    width: 34px;
    height: 34px;
    font-size: 22px;
  }

  .jm-cp__fallback {
    min-height: 160px;
    font-size: 20px;
  }

  .jm-cp__discount {
    font-size: 18px;
  }

  .jm-cp__description,
  .jm-cp__label {
    font-size: 14px;
  }

  .jm-cp__code {
    min-height: 40px;
    font-size: 16px;
  }

  .jm-cp__copy {
    min-height: 40px;
    font-size: 13px;
  }
}

@media (max-width: 640px) {
  .jm-cp__overlay {
    padding: 16px;
  }

  .jm-cp__dialog {
    border-radius: 10px;
  }

  .jm-cp__body {
    padding: 20px 16px 16px;
  }

  .jm-cp__close {
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    font-size: 20px;
  }

  .jm-cp__image-wrap {
    margin-bottom: 16px;
  }

  .jm-cp__fallback {
    min-height: 140px;
    margin-bottom: 16px;
    font-size: 18px;
  }

  .jm-cp__discount {
    margin-bottom: 10px;
    font-size: 16px;
  }

  .jm-cp__description,
  .jm-cp__label {
    margin-bottom: 10px;
    font-size: 13px;
  }

  .jm-cp__code-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .jm-cp__code,
  .jm-cp__copy {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .jm-cp__code {
    min-height: 38px;
    padding: 0 14px;
    font-size: 14px;
  }

  .jm-cp__copy {
    min-height: 38px;
    padding: 0 16px;
    font-size: 12px;
  }
}
