.coupon-form {
  margin: 0 auto;
  max-width: var(--xl-width);
  padding: 0 var(--xs-gap);
}

.coupon-form__content fieldset.coupon-form__radio {
  position: relative;
}

.coupon-form__content fieldset.coupon-form__radio:after {
  content: '';
  position: absolute;
  left: 0;
  height: 1px;
  width: 100%;
  background-color: var(--pen);
}

.coupon-form__content fieldset.coupon-form__radio:after {
  bottom: 0;
}

.coupon-form__content fieldset.coupon-form__radio > legend {
  position: relative;
  cursor: pointer;
  width: 100%;
  padding: 1rem 0;
  font-size: 1.3rem;
  font-weight: 500;
}

.coupon-form__content fieldset.coupon-form__radio > legend:after,
.coupon-form__content fieldset.coupon-form__radio > legend:before {
  content: '';
  position: absolute;
  top: 50%;
  right: 0;
  height: 2px;
  width: 1rem;
  transform: translateY(-50%);
  background-color: var(--pen);
  transition: transform .25s;
}

.coupon-form__content fieldset.coupon-form__radio > legend:before {
  top: 49%;
  transform: rotate(90deg);
}

.coupon-form__content fieldset.coupon-form__radio--open > legend:after {
  transform: rotate(180deg);
}

.coupon-form__content fieldset.coupon-form__radio--open > legend:before {
  transform: rotate(-180deg);
}

.coupon-form .form-item-coupon-image,
.coupon-form__content fieldset.coupon-form__radio .form-item,
.coupon-form .form-item-gift,
.coupon-form .form-item-gift-date-radios,
.coupon-form__iframe-innerwrapper,
.coupon-form .form-item-gift-email,
.coupon-form .coupon-form__gift-date {
  display: flex;
}

.coupon-form .form-item-gift-email,
.coupon-form__iframe-innerwrapper {
  flex-direction: column;
}

.coupon-form .form-item-coupon-amount > label,
.coupon-form__gift-radios > legend,
.coupon-form .form-item-gift-email > label,
.coupon-form .form-item-gift-text {
  font-weight: 500;
}

.coupon-form__content fieldset.coupon-form__radio .form-item {
  margin-left: 1.2rem;
}

.coupon-form fieldset.coupon-form__radio .fieldset-wrapper {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s;
}

.coupon-form fieldset.coupon-form__radio .fieldset-wrapper.overflow-visible {
  overflow: visible;
}

.coupon-form fieldset.coupon-form__radio--open .fieldset-wrapper {
  max-height: var(--item-body-height);
}

.coupon-form fieldset.coupon-form__radio .fieldset-wrapper .form-type-radio {
  margin-bottom: .5rem;
}

.coupon-form fieldset.coupon-form__radio .fieldset-wrapper .form-type-radio:last-child {
  margin-bottom: 1rem;
}

.coupon-form__hint {
  font-size: 1rem;
  margin-top: 0.25rem;
}

.coupon-form #edit-coupon-image {
  display: grid;
  gap: 1rem 2rem;
  margin-left: -.7rem;

  @media (min-width: 651px) {
    grid-template-columns: repeat(2, 1fr);
  }

  @media (min-width: 1025px) {
    grid-template-columns: repeat(3, 1fr);
  }
}

.coupon-form #edit-coupon-image > .form-item-coupon-image:last-child {
  @media (min-width: 651px) {
    grid-column: 1 / 3;
  }

  @media (min-width: 1025px) {
    grid-column: 1 / 4;
  }
}

.coupon-form #edit-coupon-image--wrapper {
  margin-left: 1.2rem;
}

.coupon-form .coupon-form__headline--top-margin,
.coupon-form .coupon-form__headline--margin {
  margin-top: 2.5rem;
}

.coupon-form .coupon-form__image-upload {
  margin-top: 1rem;
}

.coupon-form .form-file {
  margin-bottom: .75rem;

  @media (max-width: 400px) {
    font-size: .8rem;
  }
}

.coupon-form .description {
  font-size: 0.9rem;
  line-height: 1.5;
}

.coupon-form input[data-drupal-selector="edit-coupon-amount"] {
  padding: .75rem;
  max-width: 3rem;
  text-align: center;
  aspect-ratio: 1/1;
}

.coupon-form .coupon-form__gift-radios[data-drupal-selector="edit-gift"] {
  margin-top: 1rem;
}

.coupon-form .coupon-form__gift-radios .fieldset-wrapper {
  margin: .5rem 0 1rem .4rem;
}

.coupon-form__iframe-wrapper {
  position: fixed;
  top: 48%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80vw;
  height: 80vh;
  z-index: 10;
}

.coupon-form__iframe-button {
  width: fit-content;
  margin-bottom: .5rem;
}

.coupon-form__iframe {
  width: 80vw;
  height: 80vh;
}

.coupon-form__currency {
  display: none;
}

.coupon-form textarea {
  padding: 0.5rem;
  box-sizing: border-box;
  max-width: var(--xl-width);

  @media (max-width: 1024px) {
    width: 100%;
  }
}

.coupon-form .form-item-gift-email,
.coupon-form .form-item-gift-text,
.coupon-form__gift-date-wrapper {
  margin-bottom: 1rem;
}

.coupon-form .coupon-form__gift-date-wrapper h4 {
  margin: 0 0 .5rem;
}

.coupon-form .coupon-form__gift-date {
  gap: 1rem;
}

.coupon-form .form-number#edit-coupon-price {
  width: 100%;
  max-width: 17rem;
}

.coupon-form .form-submit {
  margin-top: 1rem;
}

/** css by Julian, handle with caution **/
.coupon-form .form-item-coupon-amount {
  margin-bottom: 50px;
}
