/* =====================================================================
   "Dovanų kuponas" page (Figma frame "Dovanų kuponas", 1440)
   Built on booking.css (same paper, collage, title, card and summary);
   this file only adds the coupon parts. Font sizes are plain px.
   ===================================================================== */


/* ---------- input fields + amount buttons: exact Figma shapes ----------
   Shapes are the Figma SVGs (Group 563/567/660/603) with the hand-drawn wobble
   baked into smooth paths (assets/images/shapes/coupon-field*.svg). Each SVG
   frame has a 4px edge around the visible shape, so frames are 8px larger than
   the Figma sizes (298×43, 607×43, 607×171, 296×43) and sit 4px outside the column. */
.coupon .field {
  height: 51px;
  min-height: 0;
  padding: 0 24px; /* text starts 20px inside the shape, as in Figma */
  font: 600 16px/1.2 Montserrat, Arial, sans-serif;
  color: var(--ink);
  background-image: linear-gradient(#dbdbdb, #dbdbdb);
  -webkit-mask: url("../images/shapes/coupon-field.svg") center / 100% 100% no-repeat;
  mask: url("../images/shapes/coupon-field.svg") center / 100% 100% no-repeat;
}
.coupon .field::placeholder {
  color: #a4a4a3;
  opacity: 1;
}
.coupon .field:focus {
  background-image: linear-gradient(#cfcfcf, #cfcfcf);
}
.coupon .field.is-invalid {
  background-image: linear-gradient(#f0c8c3, #f0c8c3);
}
/* two columns: 11px between shapes, 53px row pitch */
.coupon .fields--2 {
  grid-template-columns: 1fr 1fr;
  gap: 2px 3px;
  margin: 0 -4px;
}
.coupon .fields:not(.fields--2) {
  gap: 2px;
  margin: 0 -4px;
}
.coupon .field--wide {
  width: 100%;
  max-width: none;
  height: 51px;
  margin: 0;
  padding-left: 24px;
  -webkit-mask-image: url("../images/shapes/coupon-field-wide.svg");
  mask-image: url("../images/shapes/coupon-field-wide.svg");
}
.coupon .field--area {
  display: block;
  width: 100%;
  max-width: none;
  height: 178px;
  min-height: 120px;
  margin: 0;
  padding: 15px 24px;
  line-height: 1.4;
  resize: vertical;
  -webkit-mask-image: url("../images/shapes/coupon-field-area.svg");
  mask-image: url("../images/shapes/coupon-field-area.svg");
}

/* ---------- step 1: amounts ---------- */
.amounts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 7px; /* 51px frames → 53px pitch; 15px between the visible shapes */
  margin: 0 -4px; /* frames include a 4px edge around the shape */
}
.amount span {
  height: 51px;
  font: 600 16px/1 Montserrat, Arial, sans-serif;
  color: #a4a4a3;
  background: #dbdbdb;
  -webkit-mask-image: url("../images/shapes/coupon-field-amount.svg");
  mask-image: url("../images/shapes/coupon-field-amount.svg");
}
.amount input:checked + span {
  background: var(--ink);
  color: #fff;
}
.amount:hover span {
  color: var(--ink);
}
.amount-custom {
  margin: 2px -4px 0;
}
.amount-custom[hidden] {
  display: none;
}
.amount-custom .field {
  width: calc(50% - 3.5px);
}

/* ---------- card: taller torn top than on the booking page (Figma) ---------- */
@media (min-width: 1250px) {
  .coupon .booking-card {
    margin-top: -30px;
    padding-top: calc(140 * var(--u));
  }
}
.coupon .booking-step:first-child {
  padding-bottom: calc(58.5 * var(--u));
}
.coupon .booking-step:nth-child(2) {
  padding-bottom: calc(47.5 * var(--u));
}
.coupon .booking-inner {
  padding-bottom: 56px;
}

/* ---------- step 3: coupon design ---------- */
.coupon .booking-step:last-of-type {
  padding-bottom: 0;
}
.coupon .booking-step:last-of-type::after {
  display: none;
}

.coupon-info {
  margin: 26px 0 0 calc(-11 * var(--u));
  padding: 0 0 0 18px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

/* ---------- summary: only the total + button ---------- */
.coupon .summary__row {
  padding-bottom: calc(32 * var(--u));
}
.coupon .summary__total {
  margin-bottom: 0;
}

/* ---------- phones ---------- */
@media (max-width: 600px) {
  .amount span {
    font-size: 15px;
  }
  .coupon .fields--2 {
    grid-template-columns: 1fr;
  }
  .amount-custom .field {
    width: 100%;
  }
}

/* ---------- invoice company fields (shown when "Reikalinga sąskaita faktūra" is ticked) ---------- */
/* more specific than ".coupon .fields--2" (which sets margin: 0 -4px) */
.coupon .invoice-fields {
  margin-top: 36px;
}
.invoice-fields[hidden] {
  display: none;
}
/* spam trap, never visible */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.summary__submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* ---------- payment result (back from Paysera) ---------- */
.coupon-result {
  position: relative;
  z-index: 3;
  max-width: 713px;
  margin: 0 0 56px auto;
  margin-right: calc(1026px - 713px);
  padding: 30px 40px 32px;
  background:
    url("../images/backgrounds/page-texture.png") 0 0 / 728px auto repeat,
    #e9e9e9;
  background-blend-mode: soft-light, normal;
  border-left: 8px solid #2e7d32;
  color: var(--ink);
}
.coupon-result--pending {
  border-left-color: #ffb81c;
}
.coupon-result--cancelled {
  border-left-color: #b3261e;
}
.coupon-result h2 {
  margin: 0 0 10px;
  font: 400 22px/1.2 Bungee, sans-serif;
}
.coupon-result p {
  margin: 0;
  font: 500 16px/1.5 Montserrat, sans-serif;
}
.coupon-result .pill-btn {
  display: inline-flex;
  align-items: center;
  height: 46px;
  margin-top: 18px;
  padding: 0 24px;
  background: var(--ink);
  color: #fff;
  font: 400 16px/1 Bungee, sans-serif;
  text-decoration: none;
  -webkit-mask: var(--wobble-pill) center / 100% 100% no-repeat;
  mask: var(--wobble-pill) center / 100% 100% no-repeat;
}

@media (max-width: 1249px) {
  .coupon-result {
    max-width: 720px;
    margin: 24px auto;
    padding: 24px 22px 26px;
  }
}
