/**
 * Top Dog multi step modal form.
 */

.tdmf-backdrop,
.tdmf-backdrop * {
  box-sizing: border-box;
}

.tdmf-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(12, 20, 34, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  visibility: hidden;
  pointer-events: none;
}

.tdmf-backdrop[hidden] {
  display: none !important;
}

.tdmf-backdrop:not([hidden]) {
  display: flex;
  opacity: 0;
  visibility: visible;
  pointer-events: auto;
}

.tdmf-backdrop.tdmf-backdrop--open {
  opacity: 1;
}

.tdmf-modal {
  width: min(100%, 860px);
  max-height: min(92vh, 760px);
  height: min(92vh, 760px);
  background: #fff;
  border-radius: 22px;
  border: 1px solid #dfe4ea;
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  font-family: "DM Sans", system-ui, sans-serif;
  color: #1f2f46;
  transform: translateY(18px) scale(0.985);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}

.tdmf-backdrop.tdmf-backdrop--open .tdmf-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .tdmf-backdrop,
  .tdmf-modal {
    transition-duration: 0.01ms !important;
  }
}

.tdmf-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid #e7ebf1;
  background: #fff;
  color: #a8b1bd;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  padding: 0;
}

.tdmf-head {
  border-bottom: 1px solid #eef2f6;
  padding: 30px 30px 16px;
}

.tdmf-title {
  margin: 0;
  font-family: "Barlow Condensed", "DM Sans", sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 42px;
  line-height: 1.15;
  color: rgb(27, 46, 75);
}

.tdmf-step-meta {
  margin: 8px 0 10px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  color: oklch(0.551 0.027 264.364);
}

.tdmf-progress {
  height: 6px;
  background: #edf1f5;
  border-radius: 20px;
  overflow: hidden;
}

.tdmf-progress-bar {
  width: 20%;
  height: 100%;
  background: #1b2e4b;
  transition: width 0.25s ease;
}

.tdmf-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.tdmf-steps {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 30px;
}

.tdmf-step {
  display: none;
}

.tdmf-step.is-active {
  display: block;
}

.tdmf-question {
  margin: 0 0 16px;
  font-family: "Barlow Condensed", "DM Sans", sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 26px;
  line-height: 1.2;
  color: rgb(27, 46, 75);
}

.tdmf-subtext {
  margin: -4px 0 16px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.45;
  color: oklch(0.551 0.027 264.364);
}

.tdmf-card-grid {
  display: grid;
  gap: 16px;
}

.tdmf-card-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tdmf-select-card {
  text-align: left;
  background: #fff;
  border: 1px solid #e2e7ec;
  border-radius: 16px;
  padding: 20px;
  color: #2b3d57;
  cursor: pointer;
  min-height: 150px;
}

.tdmf-select-card__icon {
  display: inline-flex;
  width: 26px;
  height: 26px;
  margin-bottom: 10px;
  color: #7a8594;
}

.tdmf-select-card__icon svg {
  width: 100%;
  height: 100%;
}

.tdmf-select-card__title {
  display: block;
  font-family: "Barlow Condensed", "DM Sans", sans-serif;
  font-style: normal;
  font-weight: 700;
  font-size: 26px;
  line-height: 1.2;
  color: rgb(27, 46, 75);
}

.tdmf-select-card__desc {
  display: block;
  margin-top: 8px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.45;
  color: oklch(0.551 0.027 264.364);
}

.tdmf-select-card.is-selected,
.tdmf-container.is-selected {
  border-color: #1b2e4b;
  box-shadow: inset 0 0 0 2px #1b2e4b;
}

.tdmf-pill-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.tdmf-pill {
  border-radius: 15px;
  border: 1px solid #e1e6ec;
  background: #fff;
  color: oklch(0.551 0.027 264.364);
  padding: 14px 15px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
}

.tdmf-pill.is-selected {
  background: #1b2e4b;
  border-color: #1b2e4b;
  color: #fff;
}

.tdmf-container-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.tdmf-container {
  position: relative;
  border-radius: 16px;
  border: 1px solid #e2e7ec;
  background: #fff;
  color: #7c8897;
  text-align: left;
  padding: 16px 16px 14px;
  min-height: 126px;
  cursor: pointer;
}

.tdmf-container span {
  display: block;
  font-family: "DM Sans", system-ui, sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.45;
  color: oklch(0.551 0.027 264.364);
}

.tdmf-container__title {
  font-family: "Barlow Condensed", "DM Sans", sans-serif !important;
  font-style: normal !important;
  font-weight: 700 !important;
  font-size: 26px !important;
  line-height: 1.2 !important;
  color: rgb(27, 46, 75) !important;
  margin-bottom: 6px;
}

.tdmf-container__check {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid #8f98a5;
  display: none !important;
  align-items: center;
  justify-content: center;
  color: #1b2e4b;
  font-size: 14px !important;
}

.tdmf-container.is-selected .tdmf-container__check {
  display: inline-flex !important;
}

.tdmf-input-label {
  display: block;
  margin: 18px 0 8px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.45;
  color: oklch(0.551 0.027 264.364);
}

.tdmf-input {
  width: 100%;
  border: 1px solid #e2e7ec;
  border-radius: 14px;
  padding: 12px 14px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.45;
  color: oklch(0.551 0.027 264.364);
}

.tdmf-input--textarea {
  min-height: 90px;
  resize: vertical;
}

.tdmf-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tdmf-privacy {
  margin: 10px 0 0;
  font-family: "DM Sans", system-ui, sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.45;
  color: oklch(0.551 0.027 264.364);
}

.tdmf-turnstile {
  margin: 16px 0 0;
}

.tdmf-message {
  margin: 0;
  padding: 0 30px;
  min-height: 24px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-style: normal;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.45;
  color: #0d7a43;
}

.tdmf-message.is-error {
  color: #a83f3f;
}

.tdmf-footer {
  border-top: 1px solid #eef2f6;
  padding: 18px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  position: sticky;
  bottom: 0;
  z-index: 2;
}

.tdmf-btn {
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-family: "DM Sans", system-ui, sans-serif;
  font-style: normal;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.45;
  padding: 11px 28px;
  transition: opacity 0.2s ease;
}

.tdmf-btn:hover {
  opacity: 0.9;
}

.tdmf-btn--ghost {
  color: #8e99a5;
  background: #fff;
  border: 1px solid #e4e9ef;
}

.tdmf-btn--primary {
  background: #1b2e4b;
  color: #fff;
}

.tdmf-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

body.tdmf-lock {
  overflow: hidden;
}

@media (max-width: 900px) {
  .tdmf-backdrop {
    align-items: flex-start;
    padding: 10px;
  }
  .tdmf-modal {
    width: 100%;
    max-height: calc(100vh - 20px);
    height: calc(100vh - 20px);
    border-radius: 16px;
  }
  .tdmf-close {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    font-size: 22px;
  }
  .tdmf-head {
    padding: 20px 18px 12px;
  }
  .tdmf-steps {
    padding: 18px;
  }
  .tdmf-footer {
    padding: 12px 18px;
    gap: 10px;
  }
  .tdmf-card-grid--2,
  .tdmf-container-grid,
  .tdmf-pill-grid,
  .tdmf-contact-grid {
    grid-template-columns: 1fr;
  }
  .tdmf-btn {
    padding: 10px 20px;
  }
}
