/* =========================================================
   HappyDog – Gift Certificate (XD board: "Gift Certificate")
   Loaded only when Theme Options → Gift Certificate → "Enable theme styling" is on.
   Form / box colours and the banner image come from those Theme Options.
   ========================================================= */

/* Page background: paw/bone pattern by default; the image chosen in
   Theme Options → Gift Certificate → "Page background image" is added as inline CSS after this file. */
body.sng_page-template-sng-gift-certificate-template {
  background-color: #ffffff;
  background-image: url("../img/background-pattern.svg");
  background-repeat: repeat;
  background-size: 736px auto;
}

.sng_page-template-sng-gift-certificate-template #content.type-sng-page {
  max-width: 1366px;
  margin: 0 auto;
  padding: 149px 38px 0;
}

/* Banner: 360px photo, 150/100 corners, white title centred vertically (left-aligned, as in the design) */
.sng_page-template-sng-gift-certificate-template header.page-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 360px;
  padding: 55px 30px;
  border-radius: 150px 0 100px 0;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  overflow: hidden;
}

/* light left-side shade so the white title stays readable on any uploaded photo */
.sng_page-template-sng-gift-certificate-template header.page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0) 60%
  );
  border-radius: 0;
  opacity: 1;
  pointer-events: none;
}

.sng_page-template-sng-gift-certificate-template
  header.page-header
  h1.entry-title {
  position: relative;
  z-index: 2;
  max-width: 615px;
  margin: 0;
  font-family: "Original Surfer", sans-serif;
  font-size: 100px;
  font-weight: 400;
  line-height: 100px;
  letter-spacing: -4px;
  color: #ffffff !important;
}

/* Content row: any page text stacks on the left, the form sits on the right overlapping the banner.
   (The plugin prints the page text straight into .sng-page-content, so a grid keeps it in one column.) */
.sng_page-template-sng-gift-certificate-template
  #content.type-sng-page
  .sng-page-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 625px;
  column-gap: 40px;
  align-items: start;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 40px 0 0;
}

.sng_page-template-sng-gift-certificate-template
  #content.type-sng-page
  .sng-page-content
  > * {
  grid-column: 1;
  max-width: 595px;
  margin-top: 0;
  padding-left: 30px;
  font-family: "Outfit", sans-serif;
  font-size: 20px;
  line-height: 34px;
  color: #646464;
}

.sng_page-template-sng-gift-certificate-template
  #content.type-sng-page
  .sng-page-content
  > .sng-gift-certificate-form {
  grid-column: 2;
  grid-row: 1 / span 30;
  max-width: none;
  padding-left: 0;
  font-size: 16px;
  line-height: 24px;
  color: #000000;
}

/* Form card (background colour: Theme Options "Form background color") */
#sng_gift_certificate_form {
  position: relative;
  z-index: 2;
  float: right;
  width: 100%;
  max-width: 595px;
  margin: -323px 30px 0 0 !important;
  padding: 80px 84px 40px;
  background: var(--e-global-color-hdcream, #fff9ef);
  border-radius: 100px 0 50px 0;
  box-shadow: none;
}

#sng_gift_certificate_form br {
  display: none;
}

#sng_gift_certificate_form .sng-form-group {
  margin-bottom: 18px;
}

#sng_gift_certificate_form label,
#sng_gift_certificate_form .sng-form-group label {
  display: block;
  margin-bottom: 6px;
  font-family: "Outfit", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 20px;
  color: #000000;
}

#sng_gift_certificate_form
  input:not([type="submit"]):not([type="hidden"]):not([type="checkbox"]):not(
    [type="radio"]
  ),
#sng_gift_certificate_form select,
#sng_gift_certificate_form textarea,
#sng_gift_certificate_form .StripeElement,
#sng_gift_certificate_form #card-element {
  width: 100%;
  max-width: 428px;
  height: 60px;
  padding: 0 18px;
  background: #ffffff;
  border: 1px solid #e3e3e3;
  border-radius: 20px 0 10px 0;
  box-shadow: none;
  font-family: "Outfit", sans-serif;
  font-size: 16px;
  color: #000000;
}

#sng_gift_certificate_form textarea {
  height: 120px;
  padding-top: 14px;
}

#sng_gift_certificate_form .StripeElement,
#sng_gift_certificate_form #card-element {
  padding-top: 20px;
  padding-bottom: 20px;
}

#sng_gift_certificate_form input:focus,
#sng_gift_certificate_form select:focus,
#sng_gift_certificate_form textarea:focus,
#sng_gift_certificate_form .StripeElement--focus {
  outline: none;
  border-color: var(--e-global-color-primary, #7db82a);
}

/* Submit button: green, right-aligned, design corners (colours: Theme Options button fields) */
#gift_certificate_submit,
#sng_gift_certificate_form [type="submit"] {
  display: block;
  width: auto;
  margin: 0px;
  padding: 16px 44px;
  background-color: var(--e-global-color-secondary, #4b760e);
  color: #ffffff;
  border: none;
  border-radius: 22px 0 56px 0;
  font-family: "Original Surfer", sans-serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 38px;
  text-transform: none;
  cursor: pointer;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

#gift_certificate_submit:hover,
#sng_gift_certificate_form [type="submit"]:hover {
  box-shadow: 0 3px 3px rgba(0, 0, 0, 0.16);
  transform: translateY(-1px);
}

/* "Black Friday Promo" box (colours: Theme Options "Promo box background / text color") */
.sng-gift-certificate-promo {
  display: flex;
  flex-direction: column;
  max-width: 428px;
  margin-bottom: 30px;
  padding: 30px;
  border-radius: 50px 0 30px 0;
  font-family: "Outfit", sans-serif;
}

.sng-gift-certificate-promo h2 {
  margin: 0 0 4px;
  font-family: "Outfit", sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 34px;
  letter-spacing: 0;
  color: #000000;
}

.sng-gift-certificate-promo p {
  margin: 0;
  font-size: 20px;
  line-height: 27px;
  color: inherit; /* Theme Options "Promo box text color" */
}

/* BONUS / total box (colours: Theme Options "Bonus box background / text color") */
.sng-amount-total {
  max-width: 428px;
  margin: 10px 0 24px;
  padding: 30px;
  border-radius: 50px 0 30px 0;
  font-family: "Outfit", sans-serif;
}

.gift-bonus-subtitle {
  margin-bottom: 14px;
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
  font-family: "Outfit", sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 34px;
  color: #000000 !important;
}

.gift-amount,
.gift-bonus,
.gift-total {
  margin-bottom: 14px;
  padding: 0;
  border-bottom: none;
  font-size: 16px;
  line-height: 27px;
}

.gift-total {
  margin-bottom: 0;
  font-size: 20px;
  font-weight: 700;
}

.gift-total .value {
  font-weight: 700;
}

/* "Email the gift certificate to…" options */
#sng_send_to_group {
  margin-bottom: 0;
}

#sng_send_to_group > * {
  margin-bottom: 14px;
}

#sng_send_to_group .sng-radio-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

#sng_send_to_group .sng-radio-group label {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  color: #1a1a1d;
}

#sng_send_to_group input[type="radio"],
#sng_send_to_group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--e-global-color-secondary, #4b760e);
}

@media only screen and (max-width: 1024px) {
  .sng_page-template-sng-gift-certificate-template
    #content.type-sng-page
    .sng-page-content {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 30px;
  }

  .sng_page-template-sng-gift-certificate-template
    #content.type-sng-page
    .sng-page-content
    > * {
    grid-column: 1;
    grid-row: auto;
    max-width: none;
  }

  .sng_page-template-sng-gift-certificate-template
    #content.type-sng-page
    .sng-page-content
    > .sng-gift-certificate-form {
    grid-column: 1;
    grid-row: auto;
    max-width: none;
  }

  .sng_page-template-sng-gift-certificate-template #content.type-sng-page {
    padding: 152px 30px 0;
  }

  #sng_gift_certificate_form {
    float: none;
    max-width: none;
    margin: 0 !important;
  }
}

@media only screen and (max-width: 767px) {
  .sng_page-template-sng-gift-certificate-template
    #content.type-sng-page
    .sng-page-content
    > * {
    padding-left: 0;
    font-size: 17px;
    line-height: 32px;
  }

  .sng_page-template-sng-gift-certificate-template #content.type-sng-page {
    padding: 152px 20px 0;
  }

  .sng_page-template-sng-gift-certificate-template header.page-header {
    min-height: 240px;
    padding: 36px 20px;
    border-radius: 80px 0 50px 0;
  }

  .sng_page-template-sng-gift-certificate-template
    header.page-header
    h1.entry-title {
    font-size: 60px;
    line-height: 60px;
    letter-spacing: -2.4px;
  }

  #sng_gift_certificate_form {
    padding: 40px 20px;
    border-radius: 50px 0 30px 0;
  }

  #sng_gift_certificate_form
    input:not([type="submit"]):not([type="hidden"]):not([type="checkbox"]):not(
      [type="radio"]
    ),
  #sng_gift_certificate_form select,
  #sng_gift_certificate_form textarea,
  #sng_gift_certificate_form .StripeElement,
  #sng_gift_certificate_form #card-element {
    max-width: none;
  }

  #gift_certificate_submit,
  #sng_gift_certificate_form [type="submit"] {
    font-size: 22px;
    padding: 14px 32px;
  }
}
