/* =============================================================================
   LP Contact Drawer — Figma node 1547:2475
   Tokens align with webstyle.css (:root) + exact Figma type/color values.
   ============================================================================= */

.lp-contact-drawer {
  --lp-drawer-width: min(643px, 100vw);
  --lp-drawer-pad-x: clamp(24px, 5.6vw, 81px);
  --lp-drawer-pad-y: clamp(40px, 6vw, 67px);
  --lp-drawer-gap: clamp(28px, 3.3vw, 48px);
  --lp-field-gap: clamp(20px, 2.2vw, 32px);
  --lp-input-h: 56px;
  --lp-radius: 4px;
  --lp-border: rgba(214, 214, 214, 0.6);
  --lp-placeholder: #56595c;
  --lp-required: #e10004;
  --lp-accent: #0ab9fe;
  --lp-title: #000407;
  --lp-close-border: #e3f6fe;
  --lp-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --lp-duration: 0.45s;

  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  /* Delay hiding until the slide-out finishes */
  visibility: hidden;
  transition: visibility 0s linear var(--lp-duration);
}

/* Open state: enable interaction + reveal children */
.lp-contact-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
  transition: visibility 0s linear 0s;
}

/* ---------- Overlay (fade) ---------- */
.lp-contact-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 4, 7, 0.45);
  opacity: 0;
  transition: opacity var(--lp-duration) ease;
  cursor: pointer;
}

.lp-contact-drawer.is-open .lp-contact-drawer__overlay {
  opacity: 1;
}

/* ---------- Panel (slide right → left on open) ---------- */
.lp-contact-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 42%;
  height: 100%;
  background: #ffffff;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform var(--lp-duration) var(--lp-ease);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.lp-contact-drawer.is-open .lp-contact-drawer__panel {
  transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {

  .lp-contact-drawer__overlay,
  .lp-contact-drawer__panel {
    transition: none;
  }
}

/* Close control — top-right, Figma button with cyan glow */
.lp-contact-drawer__close {
  position: absolute;
  top: clamp(16px, 3.5vw, 50px);
  right: clamp(16px, 2.5vw, 24px);
  z-index: 2;
  width: 4vw;
  height: 4vw;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.64px solid var(--lp-close-border);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 9.286px 11.81px rgba(195, 236, 249, 0.4);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lp-contact-drawer__close:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 16px rgba(195, 236, 249, 0.55);
}

.lp-contact-drawer__close:focus-visible {
  outline: 2px solid var(--lp-accent);
  outline-offset: 2px;
}

.lp-contact-drawer__close-icon {
  width: 32px;
  height: 32px;
  display: block;
  object-fit: contain;
}

/* Content column — Figma left/top padding (~81 / 67) */
.lp-contact-drawer__inner {
  padding: 10% 10%;
  padding-right: 18%;
  display: flex;
  flex-direction: column;
  gap: 3vw;
  justify-content: center;
  min-height: 100%;
  box-sizing: border-box;
}

.lp-contact-drawer__header {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: flex-start;
}

/* Source Serif 4 Light Italic — 22px / #000407 */
.lp-contact-drawer__eyebrow {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 300;
  font-style: italic;
  font-size: 1.2vw;
  line-height: 100%;
  color: var(--lp-title);
}

/* Manrope SemiBold — 32px / #0AB9FE */
.lp-contact-drawer__title {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: clamp(24px, 2.2vw, 2.2vw);
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--lp-accent);
}

/* ---------- Form ---------- */
.lp-contact-form {
  display: flex;
  flex-direction: column;
  gap: 1vw;
  width: 100%;
}

.lp-contact-form__field {
  position: relative;
  width: 100%;
}

.lp-contact-form__input,
.lp-contact-form__select,
.lp-contact-form__textarea {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1.1vw;
  line-height: 24px;
  color: var(--lp-title);
  background: #ffffff;
  border: 1px solid var(--lp-border);
  border-radius: var(--lp-radius);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

.lp-contact-form__input,
.lp-contact-form__select {
  height: 3.5vw;
  padding: 0 18px;
}

.lp-contact-form__textarea {
  min-height: 95px;
  height: 95px;
  padding: 18px;
  resize: vertical;
}

.lp-contact-form__select {
  padding-right: 48px;
  cursor: pointer;
  color: var(--lp-placeholder);
}

/* Once a real option is chosen, use body text color */
.lp-contact-form__select.has-value {
  color: var(--lp-title);
}

.lp-contact-form__input:focus,
.lp-contact-form__select:focus,
.lp-contact-form__textarea:focus {
  border-color: var(--lp-accent);
  box-shadow: 0 0 0 3px rgba(10, 185, 254, 0.12);
}

/* Custom placeholder label so the red * can sit next to the text (Figma) */
.lp-contact-form__float-label {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1.1vw;
  line-height: 24px;
  color: var(--lp-placeholder);
  pointer-events: none;
  white-space: nowrap;
}

.lp-contact-form__float-label--textarea {
  top: 18px;
  transform: none;
}

.lp-contact-form__star {
  color: var(--lp-required);
}

/* Hide fake placeholder when the field has content or focus */
.lp-contact-form__input:not(:placeholder-shown)~.lp-contact-form__float-label,
.lp-contact-form__input:focus~.lp-contact-form__float-label,
.lp-contact-form__textarea:not(:placeholder-shown)~.lp-contact-form__float-label,
.lp-contact-form__textarea:focus~.lp-contact-form__float-label {
  opacity: 0;
  visibility: hidden;
}

/* Chevron from Figma is left-pointing — rotate to point down */
.lp-contact-form__chevron {
  position: absolute;
  top: 50%;
  right: 18px;
  width: 18px;
  height: 10px;
  transform: translateY(-50%) rotate(-90deg);
  pointer-events: none;
  object-fit: contain;
}

.lp-contact-form__submit {
  width: 100%;
  height: 60px;
  margin: 0;
  padding: 14px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1.2vw;
  line-height: normal;
  color: #ffffff;
  background: #000000;
  border: 0;
  border-radius: var(--lp-radius);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.lp-contact-form__submit:hover {
  background: #1a1a1a;
}

.lp-contact-form__submit:active {
  transform: scale(0.995);
}

.lp-contact-form__submit:focus-visible {
  outline: 2px solid var(--lp-accent);
  outline-offset: 2px;
}

.lp-contact-form__field.has-error .lp-contact-form__input,
.lp-contact-form__field.has-error .lp-contact-form__select,
.lp-contact-form__field.has-error .lp-contact-form__textarea {
  border-color: #d93025;
  box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.1);
}

.lp-contact-form__error {
  display: none;
  margin-top: 6px;
  font-family: var(--font-sans);
  font-size: 1vw;
  line-height: 1.3;
  color: #d93025;
}

.lp-contact-form__field.has-error .lp-contact-form__error {
  display: block;
}

.lp-contact-form__status {
  display: none;
  margin-top: -4px;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.4;
}

.lp-contact-form__status.is-success,
.lp-contact-form__status.is-error {
  display: block;
}

.lp-contact-form__status.is-success {
  color: #0f8a45;
}

.lp-contact-form__status.is-error {
  color: #d93025;
}

.lp-contact-form__submit.is-loading {
  cursor: wait;
  opacity: 0.75;
}

/* Lock page scroll while drawer is open */
body.lp-contact-drawer-open {
  overflow: hidden;
}

/* ---------- Responsive ---------- */
@media (max-width: 767.98px) {
  .lp-contact-drawer {
    --lp-drawer-width: 100vw;
    --lp-drawer-pad-x: 20px;
    --lp-drawer-pad-y: 28px;
    --lp-drawer-gap: 28px;
    --lp-field-gap: 16px;
    --lp-input-h: 52px;
  }

  .lp-contact-drawer__close {
    width: 48px;
    height: 48px;
    top: 12px;
    right: 12px;
  }

  .lp-contact-drawer__close-icon {
    width: 24px;
    height: 24px;
  }

  .lp-contact-drawer__inner {
    padding-right: calc(20px + 56px);
    max-width: none;
    justify-content: flex-start;
    gap: 6vw;
  }

  .lp-contact-drawer__eyebrow {
    font-size: 18px;
    line-height: 1.2;
  }

  .lp-contact-drawer__title {
    font-size: 22px;
  }

  .lp-contact-form__textarea {
    min-height: 70px;
    height: 70px;
  }

  .lp-contact-form__submit {
    height: 54px;
    font-size: 18px;
  }

  .lp-contact-drawer__panel {
    width: 95%;
  }

  .lp-contact-form__input,
  .lp-contact-form__select,
  .lp-contact-form__textarea,
  .lp-contact-form__float-label {
    font-size: 16px;
  }

  .lp-contact-form__error {
    font-size: 13px;
  }

  .lp-contact-form__input,
  .lp-contact-form__select {
    height: 45px;
    padding: 0 18px;
  }

  .lp-contact-form {
    gap: 3vw;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .lp-contact-drawer {
    --lp-drawer-width: min(560px, 100vw);
    --lp-drawer-pad-x: 40px;
  }

  .lp-contact-drawer__inner {
    padding-right: calc(40px + 72px);
    justify-content: flex-start;
  }

  .lp-contact-drawer__panel {
    width: 64%;
  }

  .lp-contact-form__input,
  .lp-contact-form__select,
  .lp-contact-form__textarea,
  .lp-contact-form__float-label,
  .lp-contact-form__submit {
    font-size: 18px;
  }

  .lp-contact-form__error {
    font-size: 14px;
  }

  .lp-contact-form__input,
  .lp-contact-form__select {
    height: 45px;
    padding: 0 18px;
  }

  .lp-contact-drawer__eyebrow {
    font-size: 2.2vw;
  }

  .lp-contact-form__textarea {
    min-height: 130px;
    height: 130px;
  }

  .lp-contact-form__input,
  .lp-contact-form__select {
    height: 55px;
    padding: 0 18px;
  }

  .lp-contact-form {
    display: flex;
    flex-direction: column;
    gap: 3vw;
  }
  html {
    overflow-x: hidden;
  }
}