/* KinActive Holiday Guide Styles */

:root {
  --ka-white: #ffffff;
  --ka-cream: #fff6ef;
  --ka-pink: #fcb5a4;
  --ka-font-serif: "Instrument Serif", serif;
  --ka-font-sans: "DM Sans", sans-serif;
}

/* -------------------------------------------------------------
   Bottom Promo Bar
------------------------------------------------------------- */
.kinactive-promo-bar {
  position: fixed;
  bottom: 20px; /* Spacing from bottom edge */
  left: 50%;
  transform: translateX(-50%);
  width: 915px;
  max-width: 95%;
  height: 80px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Background Image */
.kinactive-promo-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("../images/modal-promo-bg.jpg");
  background-size: cover;
  background-position: center;
  background-color: rgba(0, 0, 0, 0.2);
  background-blend-mode: multiply;
  z-index: 1;
}

@supports (
  background-image:
    url("data:image/webp;base64,UklGRgAAAABXRUJQVlA4IC4AAAAwAQCdASoEAAQAAVAfJaQAA3AA/AAA")
) {
  .kinactive-promo-bg {
    background-image: url("../images/modal-promo-bg.webp");
  }
}

/* Container & Content */
.kinactive-promo-container {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  padding-inline: 48px;
  display: flex;
  align-items: center;
}

.kinactive-promo-content {
  display: flex;
  align-items: center;
  gap: 24px;
  text-align: center;
}

/* Typography */
.kinactive-promo-title {
  font-family: var(--ka-font-serif);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.2;
  letter-spacing: 0;
  font-style: italic;
  color: var(--ka-white);
  margin: 0;
}

.kinactive-promo-title span {
  background: linear-gradient(
    180deg,
    rgba(255, 246, 239, 1) 0%,
    rgba(252, 181, 164, 1) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  padding-right: 0.3em; /* Fix for clipped italic text */
}

.kinactive-promo-subtitle {
  font-family: var(--ka-font-sans);
  font-weight: 500;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ka-cream);
  margin: 0;
}

/* CTA Button */
.kinactive-promo-cta {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--ka-cream);
}

.kinactive-promo-cta span {
  font-family: var(--ka-font-sans);
  font-weight: 700;
  font-size: 12px;
  line-height: 1.5;
}

.kinactive-arrow-icon {
  width: 12px;
  height: 12px;
  display: block;
}

/* Close Button */
.kinactive-promo-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 3;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.kinactive-promo-close:hover {
  opacity: 1;
}

.kinactive-promo-close img {
  width: 100%;
  height: 100%;
}

/* -------------------------------------------------------------
   Mobile Styles (Max-width 768px)
------------------------------------------------------------- */
@media (max-width: 768px) {
  .kinactive-promo-bar {
    width: 360px;
    max-width: 92%;
    height: auto;
    min-height: 163px;
    bottom: 20px;
    flex-direction: column;
    padding: 32px;
    box-sizing: border-box;
  }

  .kinactive-promo-content {
    flex-direction: column;
    gap: 8px;
  }

  .kinactive-promo-title {
    font-size: 32px;
  }

  .kinactive-promo-subtitle {
    max-width: 202px;
    margin: 0 auto;
  }

  .kinactive-promo-cta {
    justify-content: space-between;
    width: 89px;
  }

  .kinactive-promo-close {
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
  }
}

/* -------------------------------------------------------------
   Modal Styles
------------------------------------------------------------- */
.kinactive-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
  box-sizing: border-box;
}

.kinactive-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.kinactive-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.kinactive-modal-container {
  position: relative;
  z-index: 10001;
  width: 100%;
  max-width: 768px;
  /* Background Image from Figma */
  background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)),
    url("../images/modal-promo-bg.jpg");
  background-size: cover;
  background-position: center;
  background-color: #fff6ef;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
}

@supports (
  background-image:
    url("data:image/webp;base64,UklGRgAAAABXRUJQVlA4IC4AAAAwAQCdASoEAAQAAVAfJaQAA3AA/AAA")
) {
  .kinactive-modal-container {
    background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)),
      url("../images/modal-promo-bg.webp");
  }
}

/* Scrollable content wrapper to handle inner layout */
.kinactive-modal-scroll-content {
  position: relative;
  padding: 64px 35px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
}

.kinactive-modal-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  padding: 0;
  z-index: 5;
}
.kinactive-modal-close-btn img {
  width: 100%;
  height: 100%;
  /* filter: invert(1); White icon */
}

/* Header Section */
.kinactive-modal-header {
  text-align: center;
  max-width: 640px;
  /* margin-bottom: 24px; */
  position: relative;
  z-index: 2;
}

.kinactive-modal-title {
  font-family: var(--ka-font-sans);
  font-weight: 700;
  font-size: 48px;
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--ka-white);
  margin: 0 0 16px 0;
}

.kinactive-modal-subtitle {
  font-family: var(--ka-font-sans);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ka-cream);
  margin: 0 auto;
  max-width: 544px;
}

/* Graphic Image */
.kinactive-modal-graphic {
  width: 289px;
  height: 289px;
  margin-bottom: 32px; /* Add bottom margin for gap */
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.kinactive-modal-graphic img {
  width: 100%;
  height: auto;
  display: block;
}

/* Form Container */
.kinactive-modal-form-container {
  width: 100%;
  max-width: 697px;
  background: rgba(252, 201, 189, 0.3); /* fill_RL2486 */
  border-radius: 12px;
  padding: 48px 34px 44px;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  backdrop-filter: blur(5px); /* Optional enhancement */
}

/* -------------------------------------------------------------
   Gravity Forms Styling
   We need to override GF default styles to match Figma
------------------------------------------------------------- */
.kinactive-form-wrapper .gform_wrapper {
  margin: 0;
}

/* More specific white text rules, excluding error areas */
.kinactive-form-wrapper .gform_wrapper .gfield_label,
.kinactive-form-wrapper .gform_wrapper .gfield_consent_label,
.kinactive-form-wrapper .gform_wrapper label,
.kinactive-form-wrapper .gform_wrapper label a,
.kinactive-form-wrapper .gform_wrapper input[type="text"],
.kinactive-form-wrapper .gform_wrapper input[type="email"] {
  color: var(--ka-white) !important;
}

.kinactive-form-wrapper .gform_wrapper label,
.kinactive-form-wrapper .gform_wrapper label a {
  font-size: 14px;
}

.ginput_container.ginput_container_consent {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  column-gap: 8px;
}

.kinactive-form-wrapper .ginput_container_consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  accent-color: var(--ka-white);
}

.kinactive-form-wrapper .gform_heading {
  display: none; /* We use our own header */
}

/* Inputs */
.kinactive-form-wrapper input[type="text"],
.kinactive-form-wrapper input[type="email"] {
  background: transparent !important;
  border: 1px solid var(--ka-white) !important;
  border-radius: 12px !important;
  padding: 12px !important;
  height: 48px !important;
  color: var(--ka-white) !important;
  font-family: "Roboto", sans-serif !important; /* Figma uses Roboto here? Or DM Sans? Text style says Roboto */
  font-size: 16px !important;
  box-sizing: border-box !important;
}

.kinactive-form-wrapper input::placeholder {
  color: var(--ka-white) !important;
  opacity: 0.8;
}

/* Labels */
body .kinactive-form-wrapper .gfield_label,
body .kinactive-form-wrapper .gfield .ginput_container_text + .gfield_label,
body .kinactive-form-wrapper .gfield .ginput_container_email + .gfield_label,
body .kinactive-form-wrapper .gform-field-label--type-sub {
  display: none !important; /* Hide labels that GF might still show */
}

/* Submit Button */
.kinactive-form-wrapper .gform_button {
  background-color: var(--ka-pink) !important;
  color: var(--ka-white) !important;
  font-family: var(--ka-font-sans) !important;
  font-weight: 400 !important;
  font-size: 16px !important;
  border-radius: 99px !important;
  border: none !important;
  padding: 6px 48px !important;
  width: auto !important;
  min-width: 271px;
  cursor: pointer;
  margin: 24px auto 0 auto !important;
  display: block !important;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.kinactive-form-wrapper .gform_button:hover {
  background-color: #ffcfc5 !important; /* Lighter pink */
  transform: translateY(-2px);
}

/* Validation Errors */
.kinactive-form-wrapper .gfield_error {
  border-color: #ff6b6b !important; /* Red border for error */
}
.kinactive-form-wrapper .validation_message,
.kinactive-form-wrapper
  .gform_submission_error
  .gform_body
  .gform_errors_summary,
.kinactive-form-wrapper
  .gform_submission_error
  .gform_body
  .gform_errors_summary
  *,
.kinactive-form-wrapper
  .gform_submission_error
  .gform_body
  .gform_errors_summary
  li {
  color: #ff6b6b !important; /* Red text for error messages */
}

.kinactive-form-wrapper .gfield_checkbox {
  display: flex;
  align-items: center;
  justify-content: flex-start; /* Align left as per design */
  gap: 8px;
  padding: 0 0 16px 0; /* Padding from Figma */
}

.kinactive-form-wrapper .gfield_checkbox input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  background-color: var(--ka-white) !important;
  border: 1px solid var(--ka-white) !important;
  border-radius: 4px !important; /* Slightly rounded */
  appearance: none !important;
  -webkit-appearance: none !important;
  cursor: pointer;
  position: relative;
}

.kinactive-form-wrapper
  .gfield_checkbox
  input[type="checkbox"]:checked::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 5px;
  width: 5px;
  height: 10px;
  border: solid black; /* Black checkmark */
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

body .kinactive-form-wrapper .gfield_checkbox .gfield_consent_label,
body .kinactive-form-wrapper .gfield_checkbox label,
body
  .kinactive-form-wrapper
  .gfield_checkbox
  input[type="checkbox"]
  + .gfield_consent_label,
body .kinactive-form-wrapper .gfield_checkbox input[type="checkbox"] + label {
  color: var(--ka-white) !important;
  font-family: "Roboto", sans-serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  line-height: 1.5;
}

body .kinactive-form-wrapper .gfield_checkbox .gfield_consent_label a,
body .kinactive-form-wrapper .gfield_checkbox label a,
body
  .kinactive-form-wrapper
  .gfield_checkbox
  input[type="checkbox"]
  + .gfield_consent_label
  a,
body .kinactive-form-wrapper .gfield_checkbox input[type="checkbox"] + label a {
  color: var(--ka-white) !important;
  text-decoration: underline;
}

body .kinactive-form-wrapper .gfield_checkbox .gfield_consent_label a:hover,
body .kinactive-form-wrapper .gfield_checkbox label a:hover,
body
  .kinactive-form-wrapper
  .gfield_checkbox
  input[type="checkbox"]
  + .gfield_consent_label
  a:hover,
body
  .kinactive-form-wrapper
  .gfield_checkbox
  input[type="checkbox"]
  + label
  a:hover {
  text-decoration: none;
}

.kinactive-form-wrapper .gform_validation_errors > h2 {
  letter-spacing: 0;
}

/* -------------------------------------------------------------
   Gravity Forms Confirmation Styling
   Make the default confirmation message match our design
------------------------------------------------------------- */
.kinactive-form-wrapper .gform_confirmation_wrapper {
  display: block !important; /* Ensure it's visible */
  width: 100% !important;
  max-width: 697px !important;
  padding: 32px !important;
  box-sizing: border-box !important;
  text-align: center !important;
}

.kinactive-form-wrapper .gform_confirmation_wrapper h3 {
  font-family: var(--ka-font-sans) !important;
  font-weight: 700 !important;
  font-size: 32px !important;
  line-height: 1.3 !important;
  color: var(--ka-cream) !important; /* #FFF6EF */
  margin: 0 0 16px 0 !important;
  letter-spacing: 0;
  text-transform: title !important;
}

.kinactive-form-wrapper .gform_confirmation_wrapper p {
  font-family: var(--ka-font-sans) !important;
  font-weight: 400 !important;
  font-size: 18px !important;
  line-height: 1 !important;
  letter-spacing: 0;
  color: var(--ka-cream) !important; /* #FFF6EF */
  margin: 0 !important;
}

.kinactive-form-wrapper .gform_confirmation_wrapper a {
  color: var(--ka-cream) !important;
  text-decoration: underline;
  display: inline-block;
  margin-top: 6px;
}

.kinactive-form-wrapper .gform_confirmation_wrapper a:hover {
  text-decoration: none;
}

/* Mobile styles for confirmation */
@media (max-width: 768px) {
  .kinactive-form-wrapper .gform_confirmation_wrapper {
    padding: 24px !important;
    margin: 24px auto 0 auto !important;
  }

  .kinactive-form-wrapper .gform_confirmation_wrapper h3 {
    font-size: 28px !important;
    margin: 0 0 20px 0 !important;
  }

  .kinactive-form-wrapper .gform_confirmation_wrapper p {
    font-size: 16px !important;
  }

  /* Mobile Close Button */
  .kinactive-modal-close-btn {
    top: 16px !important;
    right: 16px !important;
    width: 24px !important;
    height: 24px !important;
  }
}

/* Responsive Adjustments for Modal */
@media (max-width: 768px) {
  .kinactive-modal-container {
    margin: 10px;
    height: auto;
    max-height: 95vh;
    height: auto;
    max-height: 95vh;
  }

  .kinactive-modal-scroll-content {
    padding: 32px 20px;
  }

  .kinactive-modal-title {
    font-size: 32px;
  }

  .kinactive-modal-subtitle {
    font-size: 14px;
  }

  .kinactive-modal-graphic {
    width: 200px;
    height: 200px;
  }

  .kinactive-modal-form-container {
    padding: 20px;
  }
}
