/* Contact modal (ift-contact-modal.js). The form and side card inside use ift-contact-v2.css, loaded on demand;
   this file sets the dialog, the --ct-* colours (scoped to body#contact on the contact page) and a tighter fit. */

html.ift-cm-open,
html.ift-cm-open body {
  overflow: hidden;
}

.ift-cm {
  --ct-ink: #111827;
  --ct-text: #374151;
  --ct-muted: #6b7280;
  --ct-faint: #9ca3af;
  --ct-line: #e5e7eb;
  --ct-line-strong: #d1d5db;
  --ct-soft: #f9fafb;
  --ct-accent: #0f766e;
  --ct-accent-hover: #115e59;
  --ct-accent-tint: #f1f8f7;
  --ct-accent-line: #cfe7e3;
  --ct-ring: 0 0 0 3px rgba(15, 118, 110, 0.15);
  --ct-radius: 10px;
  width: min(940px, calc(100vw - 48px));
  max-width: none;
  max-height: calc(100vh - 40px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #f2f3f5;
  box-shadow: 0 20px 56px rgba(17, 24, 39, 0.28);
  color: var(--ct-text);
  overflow: hidden;
}

.ift-cm::backdrop {
  background: rgba(17, 24, 39, 0.5);
}

.ift-cm[open] {
  display: flex;
}

.ift-cm .ift-cm__panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: calc(100vh - 40px);
  padding: 0;
}

.ift-cm__head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: none;
  padding: 18px 16px 12px 24px;
}

.ift-cm__heading {
  flex: 1 1 auto;
  min-width: 0;
}

.ift-cm .ift-cm__title {
  margin: 0 0 3px;
  padding: 0;
  border: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--ct-ink);
}

.ift-cm .ift-cm__title::before,
.ift-cm .ift-cm__title::after {
  display: none;
}

.ift-cm__sub {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ct-muted);
}

.ift-cm__sub:empty {
  display: none;
}

.ift-cm__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 38px;
  height: 38px;
  margin: -4px 0 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ct-muted);
  cursor: pointer;
}

.ift-cm__close:hover,
.ift-cm__close:focus-visible {
  background: #e5e7eb;
  color: var(--ct-ink);
  outline: 0;
}

.ift-cm__body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0 24px 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.ift-cm__msg {
  margin: 0;
  padding: 40px 0 48px;
  text-align: center;
  color: var(--ct-muted);
}

.ift-cm__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}

.ift-cm__main,
.ift-cm__side {
  min-width: 0;
}

.ift-cm .ift-ct-card {
  margin: 0;
}

.ift-cm .ift-ct-note {
  margin-top: 12px;
}

/* tighter steps than the full page so the form fits a 720px-high laptop */
.ift-cm .ift-ct-step__title {
  padding: 14px 20px 4px;
  font-size: 16px;
}

.ift-cm .ift-ct-step__num {
  width: 24px;
  height: 24px;
  font-size: 12px;
}

.ift-cm .ift-ct-step__body {
  padding: 8px 20px 16px 56px;
}

.ift-cm .ift-ct-topics {
  gap: 8px;
}

.ift-cm .ift-ct-topic__box {
  padding: 9px 12px 9px 38px;
}

.ift-cm .ift-ct-topic__box::before {
  top: 11px;
  left: 12px;
}

.ift-cm .ift-ct-topic__box strong {
  font-size: 14px;
}

.ift-cm .ift-ct-topic__box span {
  font-size: 12px;
}

.ift-cm .ift-ct-field {
  margin-bottom: 12px;
}

.ift-cm .ift-ct-field .form-control {
  height: 42px;
}

.ift-cm .ift-ct .ift-ct-field textarea.form-control {
  height: 112px;
  min-height: 84px;
}

.ift-cm .ift-ct-file {
  padding: 9px 14px;
}

.ift-cm .ift-ct-submit {
  margin-top: 4px;
  padding-top: 14px;
}

.ift-cm .ift-ct-btn {
  height: 46px;
}

.ift-cm .ift-ct-submit__note {
  margin-top: 8px;
}

/* links: the contact page scopes these to body#contact */
.ift-cm .ift-ct a {
  color: var(--ct-accent);
}

.ift-cm .ift-ct a:hover {
  color: var(--ct-accent-hover);
}

.ift-cm .ift-ct a.ift-ct-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid #9ca3af;
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  color: var(--ct-ink);
  text-decoration: none;
}

.ift-cm .ift-ct a.ift-ct-pill:hover {
  border-color: var(--ct-ink);
  background: var(--ct-soft);
  color: var(--ct-ink);
}

.ift-cm .ift-ct-pill--wa svg {
  color: #1fa855;
}

.ift-cm .ift-ct-talk {
  padding: 14px 18px 4px;
}

.ift-cm .ift-ct a.ift-ct-talk__phone {
  color: var(--ct-ink);
  text-decoration: none;
}

.ift-cm .ift-ct-talk__phone strong {
  font-size: 25px;
}

.ift-cm .ift-ct a.ift-ct-talk__phone:hover strong {
  color: var(--ct-accent);
}

.ift-cm .ift-ct .ift-ct-talk__alt a {
  color: var(--ct-muted);
  text-decoration: none;
}

.ift-cm .ift-ct .ift-ct-talk__alt a:hover {
  color: var(--ct-accent);
}

.ift-cm .ift-ct .ift-ct-talk__text a {
  font-weight: 500;
}

.ift-cm .ift-ct-talk__rows li {
  padding: 9px 0;
}

/* short laptop screens (1280x720, 1366x768): keep the Send button in view */
@media (min-width: 992px) and (max-height: 820px) {
  .ift-cm,
  .ift-cm .ift-cm__panel {
    max-height: calc(100vh - 24px);
  }

  .ift-cm__head {
    padding-top: 14px;
    padding-bottom: 10px;
  }

  .ift-cm__grid {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .ift-cm .ift-ct-step__title {
    padding-top: 12px;
  }

  .ift-cm .ift-ct-step__body {
    padding-bottom: 12px;
  }

  .ift-cm .ift-ct-topic__box span {
    display: none;
  }

  .ift-cm .ift-ct .ift-ct-field textarea.form-control {
    height: 96px;
  }

  .ift-cm .ift-ct-submit__note {
    display: none;
  }
}

@media (max-width: 991.98px) {
  .ift-cm__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ift-cm .ift-ct-talk__rows {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 16px;
  }

  .ift-cm .ift-ct-talk__rows li + li {
    border-top: 0;
  }
}

@media (max-width: 767.98px) {
  .ift-cm {
    width: 100vw;
    max-height: 100%;
    height: 100%;
    border-radius: 0;
  }

  .ift-cm .ift-cm__panel {
    max-height: 100%;
  }

  .ift-cm__head {
    padding: 14px 10px 10px 16px;
  }

  .ift-cm .ift-cm__title {
    font-size: 20px;
  }

  .ift-cm__body {
    padding: 0 12px 16px;
  }

  .ift-cm .ift-ct-step__body {
    padding: 8px 16px 16px;
  }

  .ift-cm .ift-ct-topics,
  .ift-cm .ift-ct-talk__rows {
    grid-template-columns: minmax(0, 1fr);
  }

  .ift-cm .ift-ct-talk__rows li + li {
    border-top: 1px solid #eef0f2;
  }
}
