.hew-image-prompt {
  --hew-image-prompt-columns: 3;
  --hew-image-prompt-rows: 2;
  width: 100%;
}

.hew-image-prompt__grid {
  display: grid;
  grid-template-columns: repeat(var(--hew-image-prompt-columns), minmax(0, 1fr));
  column-gap: 24px;
  row-gap: 24px;
}

.hew-image-prompt--single .hew-image-prompt__grid {
  grid-template-columns: 1fr;
  justify-items: center;
}

.hew-image-prompt__item {
  position: relative;
  width: 100%;
  min-height: 780px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px;
  background: #f7f7ff;
  border: 1px solid #ecebff;
  border-radius: 32px;
  box-shadow: 0 18px 40px rgba(80, 78, 128, .10);
  overflow: hidden;
}

.hew-image-prompt__item[data-hidden-by-limit="1"] {
  display: none;
}

.hew-image-prompt__media {
  position: relative;
  width: 100%;
  height: 520px;
  border-radius: 28px;
  overflow: hidden;
  background: #ececf8;
}

.hew-image-prompt__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.hew-image-prompt__title {
  margin: 0;
  color: #191a52;
  font-size: 22px;
  line-height: 1.55;
  font-weight: 800;
  text-align: center;
}

.hew-image-prompt__title--overlay {
  position: absolute;
  right: 18px;
  left: 18px;
  bottom: 18px;
  padding: 14px 18px;
  background: rgba(21, 11, 102, .55);
  color: #fff;
  border-radius: 18px;
}

.hew-image-prompt__prompt-box {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: #fff;
  border: 1px solid #ebe9ff;
  border-radius: 26px;
  padding: 22px 26px;
  box-shadow: 0 10px 28px rgba(84, 77, 145, .07);
}

.hew-image-prompt__box-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #4c46ff;
}

.hew-image-prompt__label-text {
  color: #4c46ff;
  font-size: 15px;
  line-height: 1.6;
  font-weight: 400;
}

.hew-image-prompt__label-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: 20px;
  color: #4c46ff;
  flex: 0 0 auto;
}

.hew-image-prompt__label-icon img,
.hew-image-prompt__label-icon svg,
.hew-image-prompt__button-icon img,
.hew-image-prompt__button-icon svg,
.hew-image-prompt__label-icon i,
.hew-image-prompt__button-icon i {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}

.hew-image-prompt__divider {
  --hew-divider-thickness: 2px;
  width: 100%;
  color: #e4e1ff;
}

.hew-image-prompt__divider--solid {
  height: var(--hew-divider-thickness);
  background: currentColor;
}

.hew-image-prompt__divider--dotted {
  border-top: var(--hew-divider-thickness) dotted currentColor;
  height: 0;
}

.hew-image-prompt__divider--double {
  border-top: var(--hew-divider-thickness) double currentColor;
  height: 0;
}

.hew-image-prompt__divider--wavy {
  height: 10px;
  background-repeat: repeat-x;
  background-position: center;
  background-size: 40px 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='10' viewBox='0 0 40 10'%3E%3Cpath d='M0 5 C5 0, 15 0, 20 5 S35 10, 40 5' fill='none' stroke='%23e4e1ff' stroke-width='2'/%3E%3C/svg%3E");
}

.hew-image-prompt__divider--none {
  display: none;
}

.hew-image-prompt__prompt-scroll {
  max-height: 240px;
}

.hew-image-prompt__item[data-preview-mode="excerpt"] .hew-image-prompt__prompt-scroll {
  overflow: hidden;
}

.hew-image-prompt__item[data-preview-mode="scroll"] .hew-image-prompt__prompt-scroll {
  overflow-y: auto;
}

.hew-image-prompt__prompt-text {
  display: block;
  color: #31335e;
  font-size: 16px;
  line-height: 2;
  font-weight: 300;
  text-align: left;
  word-break: break-word;
}

.hew-image-prompt__actions {
  display: flex;
  align-items: stretch;
  gap: 18px;
}

.hew-image-prompt__actions > * {
  flex: 1 1 0;
}

.hew-image-prompt__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 64px;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 400;
  text-decoration: none;
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, opacity .22s ease;
}

.hew-image-prompt__button:hover {
  transform: translateY(-2px);
}

.hew-image-prompt__button-text {
  display: inline-block;
}

.hew-image-prompt__button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 18px;
  flex: 0 0 auto;
}

.hew-image-prompt__button--copy {
  color: #4c46ff;
  background: #fff;
  border: 2px solid #736bff;
}

.hew-image-prompt__button--view {
  color: #fff;
  border: 0;
  background: linear-gradient(135deg, #825bff 0%, #3854ff 100%);
  box-shadow: 0 14px 28px rgba(83, 73, 255, .25);
}

.hew-image-prompt__button--copied {
  opacity: .85;
}

.hew-image-prompt__modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(14, 16, 42, .55);
}

.hew-image-prompt__modal-card {
  position: relative;
  width: min(960px, 100%);
  max-height: min(90vh, 1100px);
  overflow: hidden;
  padding: 32px;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(15, 19, 49, .28);
}

.hew-image-prompt__modal-title {
  margin: 0 0 20px;
  color: #191a52;
  font-size: 22px;
  line-height: 1.5;
  font-weight: 800;
}

.hew-image-prompt__modal-scroll {
  max-height: calc(90vh - 140px);
  overflow-y: auto;
}

.hew-image-prompt__modal-text {
  display: block;
  color: #22254e;
  font-size: 16px;
  line-height: 2;
  font-weight: 300;
  word-break: break-word;
}

.hew-image-prompt__modal-close {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f1efff;
  color: #352fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

body.hew-image-prompt-modal-open {
  overflow: hidden;
}

@media (max-width: 1024px) {
  .hew-image-prompt__title {
    font-size: 20px;
  }
}

@media (max-width: 767px) {
  .hew-image-prompt__grid,
  .hew-image-prompt--grid .hew-image-prompt__grid {
    grid-template-columns: 1fr;
  }

  .hew-image-prompt__item {
    min-height: auto;
    border-radius: 22px;
    padding: 14px;
  }

  .hew-image-prompt__media {
    height: 280px;
    border-radius: 20px;
  }

  .hew-image-prompt__title {
    font-size: 18px;
  }

  .hew-image-prompt__prompt-box {
    padding: 18px;
    border-radius: 20px;
  }

  .hew-image-prompt__actions {
    flex-direction: column;
  }

  .hew-image-prompt__button {
    min-height: 54px;
  }

  .hew-image-prompt__modal-card {
    padding: 20px;
    border-radius: 20px;
  }
}
