/* Contact form and completion pages */

.global-form {
  padding: 0;
  .global-form__layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    align-items: start;
    padding-bottom: 120px;
    @media (max-width: 960px) {
      grid-template-columns: 1fr;
    }
    @media (max-width: 768px) {
      padding-bottom: 80px;
    }
  }
  .global-form__wrapper {
    @media (max-width: 768px) {
      padding: 0;
    }
  }
  .global-form__group {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .global-form__label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--fs-sm);
    font-weight: var(--weight-bold);
    margin-bottom: 0px;
    color: var(--text-primary);
  }
  .global-form__badge--required {
    display: inline-block;
    background: var(--c-coral);
    color: var(--text-inverse);
    font-size: var(--fs-10);
    font-weight: var(--weight-bold);
    padding: 0 8px;
    border-radius: var(--r-xs);
    line-height: 24px;
  }
  .global-form__help {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    margin-top: 0px;
    line-height: 1.6;
  }
  .global-form__error-message {
    color: var(--c-coral);
    background: color-mix(in srgb, var(--c-coral) 8%, transparent);
    font-size: var(--fs-xs);
    font-weight: var(--weight-bold);
    margin-top: 8px;
    line-height: 1.4;
    padding: 8px;
    border-radius: var(--r-sm);
    display: none;
    &[data-visible="true"] {
      display: block;
    }
  }
  .global-form__gotcha {
    display: none !important;
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
  }
  .global-field__input,
  .global-field__textarea {
    width: 100%;
    padding: 8px 16px;
    font-size: var(--fs-sm);
    border: 1px solid var(--border-light);
    border-radius: var(--r-sm);
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition-base);
    @media (max-width: 768px) {
      font-size: var(--fs-md);
    }
    &::placeholder {
      color: #aaa;
    }
    &:hover {
      border-color: var(--c-sky-deep);
    }
    &:focus {
      outline: 3px solid var(--focus-ring-sky);
      outline-offset: 2px;
      background: var(--bg-base);
      border-color: var(--c-sky-deep);
    }
  }
  .global-field__textarea {
    min-height: 120px;
    resize: vertical;
  }
  .global-form__cat-chips {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .global-form__cat-chip {
    position: relative;
    input {
      position: absolute;
      opacity: 0;
      pointer-events: none;
    }
    label {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      padding: 16px 8px;
      background: var(--bg-base);
      border: 1px solid var(--border-light);
      border-radius: var(--r-sm);
      cursor: pointer;
      font-size: var(--fs-sm);
      font-weight: var(--weight-bold);
      transition: var(--transition-base);
      line-height: 1.4;
    }
    &:hover label {
      border-color: var(--c-sky-deep);
      background: var(--bg-base);
    }
    input:checked + label {
      background: var(--c-sky-soft);
      border-color: var(--c-sky-deep);
    }
  }
  .global-form__ic {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    object-fit: contain;
  }
  .global-form__checkbox-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: var(--fs-sm);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 16px 16px;
    background: var(--bg-base);
    border-radius: var(--r-sm);
    border: 1px solid var(--border-light);
    transition:
      border-color 0.15s ease,
      background-color 0.15s ease;
    &:hover,
    &:has(input:checked) {
      border-color: var(--c-sky-deep);
      background: var(--c-sky-soft);
    }
    input[type="checkbox"] {
      appearance: none;
      -webkit-appearance: none;
      margin: 0px 0 0;
      width: 24px;
      height: 24px;
      flex-shrink: 0;
      border: 2px solid var(--border-mid);
      border-radius: var(--r-xs);
      background: var(--bg-base);
      cursor: pointer;
      position: relative;
      transition:
        border-color 0.15s ease,
        background-color 0.15s ease;
      &::after {
        content: "";
        position: absolute;
        inset: 0;
        margin: auto;
        width: 7px;
        height: 8px;
        border: solid var(--text-inverse);
        border-width: 0 2px 2px 0;
        transform: rotate(45deg) scale(0);
        opacity: 0;
        transition:
          transform 0.15s cubic-bezier(0.34, 1.4, 0.64, 1),
          opacity 0.12s ease;
      }
      &:hover {
        border-color: var(--c-sky-deep);
      }
      &:focus-visible {
        outline: 3px solid var(--focus-ring-sky);
        outline-offset: 3px;
        border-color: var(--c-sky-deep);
      }
      &:checked {
        background: var(--c-sky-deep);
        border-color: var(--c-sky-deep);
        &::after {
          transform: rotate(45deg) scale(1);
          opacity: 1;
        }
      }
    }
    a {
      color: var(--c-sky-deep);
      font-weight: var(--weight-bold);
    }
  }
  .global-form__actions {
    margin-top: 32px;
    .global-form__submit-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      padding: 16px 24px;
      border: none;
      border-radius: var(--r-pill);
      font-family: inherit;
      font-size: var(--fs-md);
      font-weight: var(--weight-bold);
      line-height: 1;
      color: var(--text-inverse);
      cursor: pointer;
      background: var(--c-mint);
      transition: var(--transition-base);
      &:hover:not(:disabled) {
        transform: translateY(2px);
      }
      &:active:not(:disabled) {
        transform: translateY(3px);
      }
      &:focus-visible {
        outline: 4px solid var(--focus-ring-sky);
        outline-offset: 3px;
      }
      &:disabled {
        color: rgba(255, 255, 255, 0.85);
        cursor: not-allowed;
        transform: none;
        background: rgba(0, 0, 0, 0.22);
      }
    }
  }
  .global-contact-sidebar {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 96px;
    background: var(--bg-base);
    border-radius: var(--r-lg);
    overflow: hidden;
    @media (max-width: 768px) {
      border-radius: var(--r-lg);
    }
  }
  .global-contact-sidebar__section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 32px;
    @media (max-width: 768px) {
      padding: 24px 0;
    }
  }
  .global-contact-sidebar__section + .global-contact-sidebar__section {
    border-top: 1px dashed var(--border-light);
  }
  .global-contact-sidebar__icon {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    object-fit: contain;
  }
  .global-contact-sidebar__content {
    display: flex;
    flex-direction: column;
    row-gap: 8px;
    width: 100%;
  }
  .global-contact-sidebar__title {
    font-size: var(--fs-lg);
    font-weight: var(--weight-bold);
    line-height: 1.6;
    color: var(--text-primary);
  }
  .global-contact-sidebar__desc {
    font-size: var(--fs-sm);
    font-weight: var(--weight-medium);
    line-height: 1.8;
    color: var(--text-secondary);
  }
  .global-contact-sidebar__cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 8px;
    padding: 16px 24px;
    background: var(--bg-base);
    border: 1px solid #eee;
    border-radius: var(--r-sm);
    color: var(--c-mint);
    font-size: var(--fs-md);
    font-weight: var(--weight-bold);
    line-height: 1.6;
    text-decoration: none !important;
    transition: var(--transition-base);
    img {
      flex-shrink: 0;
      width: 16px;
      height: 16px;
    }
    &:hover {
      border-color: var(--c-mint);
      background: color-mix(in srgb, var(--c-mint) 8%, transparent);
      text-decoration: underline !important;
    }
  }
}

.grecaptcha-badge {
  visibility: hidden;
}

.global-form__recaptcha-notice {
  margin-top: 8px;
  color: var(--text-secondary);
  line-height: 1.6;
  text-align: center;
  a {
    color: inherit;
    text-decoration: underline;
  }
}

/* ===== Contact complete ===== */

.global-complete {
  background: linear-gradient(180deg, var(--bg-warm) 0, #fffdf7 720px, var(--bg-base) 100%);
}

.global-complete__hero {
  padding: 48px 0 88px;
}

.global-complete__card {
  display: flex;
  width: min(800px, 100%);
  flex-direction: column;
  align-items: center;
  gap: 32px;
  margin-inline: auto;
  padding: 72px 24px;
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  background: var(--bg-base);
  text-align: center;
}

.global-complete__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.global-complete__eyebrow {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 8px 24px;
  border-radius: var(--r-pill);
  background: var(--c-mint-soft);
  color: var(--c-mint-deep);
  font-size: var(--fs-sm);
  font-weight: var(--weight-bold);
  letter-spacing: 0.08em;
}

.global-complete__head {
  h1 {
    margin: 0;
    color: var(--text-primary);
    font-size: clamp(var(--fs-3xl), 3vw, var(--fs-4xl));
    font-weight: var(--weight-extra-bold);
    line-height: 1.35;
  }
  p {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--fs-md);
    font-weight: var(--weight-medium);
    line-height: 1.8;
  }
}

.global-complete__mobile-break {
  display: none;
}

.global-complete__line {
  display: flex;
  justify-content: center;
  gap: 8px;
  width: 100%;
  span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--c-sky-base);
  }
  span:nth-child(even) {
    background: var(--c-sun-base);
  }
}

.global-complete__image {
  width: min(256px, 100%);
  height: auto;
}

.global-complete__actions {
  display: flex;
  width: min(400px, 100%);
  flex-direction: column;
  gap: 8px;
}

.global-complete__button {
  display: inline-flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 24px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: var(--fs-md);
  font-weight: var(--weight-bold);
  line-height: 1.6;
  text-decoration: none;
  transition: var(--transition-base);
  img,
  svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
  }
}

.global-complete__button--primary {
  background: var(--c-mint-base);
  color: var(--text-inverse);
  &:hover {
    background: var(--c-mint-deep);
    color: var(--text-inverse);
    text-decoration: none;
  }
}

.global-complete__button--outline {
  border-color: var(--c-mint-base);
  background: var(--bg-base);
  color: var(--c-mint-deep);
  &:hover {
    background: var(--c-mint-soft);
    text-decoration: none;
  }
}

.global-complete-flow {
  padding: 0 0 96px;
}

.global-complete-flow__inner {
  display: flex;
  width: min(1024px, 100%);
  flex-direction: column;
  align-items: center;
  gap: 48px;
  margin-inline: auto;
}

.global-complete-flow__head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: clamp(var(--fs-26), 3vw, var(--fs-38));
    font-weight: var(--weight-extra-bold);
    line-height: 1.35;
  }
}

.global-complete-flow__head-mark {
  position: relative;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  transform: rotate(-20deg);
  &::before,
  &::after {
    position: absolute;
    bottom: 0;
    left: 7px;
    width: 3px;
    height: 24px;
    border-radius: 0px;
    background: var(--c-mint-base);
    content: '';
    transform-origin: bottom;
  }
  &::after {
    transform: rotate(-38deg);
  }
}

.global-complete-flow__head-mark--right {
  transform: scaleX(-1) rotate(-20deg);
}

.global-complete-flow__steps {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 16px;
}

.global-complete-flow__step {
  display: flex;
  min-width: 0;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 32px 24px;
  border: 1px solid var(--border-light);
  border-radius: 28px;
  background: var(--bg-base);
}

.global-complete-flow__step-head {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.global-complete-flow__step-head--mint {
  --global-complete-step-accent: var(--c-mint-base);
}

.global-complete-flow__step-head--sun {
  --global-complete-step-accent: var(--c-sun-base);
}

.global-complete-flow__step-head--marine {
  --global-complete-step-accent: var(--c-marine-base);
}

.global-complete-flow__step-badge {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--global-complete-step-accent);
  color: var(--text-inverse);
  font-size: var(--fs-lg);
  font-weight: var(--weight-extra-bold);
}

.global-complete-flow__step {
  h3 {
    margin: 0;
    color: var(--global-complete-step-accent);
    font-size: var(--fs-xl);
    line-height: 1.35;
  }
  & > img {
    width: min(168px, 100%);
    height: 144px;
    object-fit: contain;
  }
  p {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    font-weight: var(--weight-bold);
    line-height: 1.7;
    text-align: center;
  }
}

.global-complete-flow__arrow {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  .global-arrow-icon {
    width: 24px;
    height: 24px;
  }
}

.global-complete-flow__support {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 32px;
  padding: 32px 40px;
  border: 1px solid #eae1bb;
  border-radius: 28px;
  background: #fef8e8;
  & > img {
    width: min(136px, 24vw);
    height: auto;
    flex: 0 0 auto;
  }
  p {
    min-width: 0;
    flex: 1 1 auto;
    margin: 0;
    color: var(--text-primary);
    font-size: var(--fs-md);
    font-weight: var(--weight-bold);
    line-height: 1.7;
  }
  a {
    display: inline-flex;
    min-height: 48px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 24px;
    border-radius: var(--r-pill);
    background: var(--bg-base);
    color: var(--c-mint-deep);
    font-weight: var(--weight-bold);
    text-decoration: none;
  }
  a:hover {
    background: var(--c-mint-soft);
    text-decoration: none;
  }
  a img {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 900px) {
  .global-complete__card {
    width: min(560px, 100%);
  }
  .global-complete-flow__steps {
    flex-direction: column;
    gap: 24px;
  }
  .global-complete-flow__step {
    width: min(480px, 100%);
  }
  .global-complete-flow__arrow {
    display: none;
  }
  .global-complete-flow__support {
    width: min(560px, 100%);
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .global-complete__hero {
    padding: 24px 0 64px;
  }
  .global-complete__card {
    gap: 24px;
    padding: 40px 16px;
    border-radius: 20px;
  }
  .global-complete__head {
    gap: 8px;
    h1 {
      font-size: var(--fs-30);
    }
    p {
      font-size: var(--fs-sm);
    }
  }
  .global-complete__mobile-break {
    display: initial;
  }
  .global-complete-flow {
    padding-bottom: 72px;
  }
  .global-complete-flow__inner {
    gap: 32px;
  }
  .global-complete-flow__head {
    gap: 8px;
  }
  .global-complete-flow__head-mark {
    width: 16px;
    height: 24px;
    &::before,
    &::after {
      height: 16px;
    }
  }
  .global-complete-flow__step {
    gap: 16px;
    padding: 24px 16px;
    border-radius: var(--r-lg);
    & > img {
      height: 120px;
    }
  }
  .global-complete-flow__support {
    padding: 24px 16px;
    border-radius: var(--r-lg);
    a {
      width: 100%;
    }
  }
}
