/* Callmasters lead popup — uses the theme's design tokens (:root vars). */
.cm-modal {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  place-items: center;
  padding: 1.2rem;
}
.cm-modal[hidden] { display: none; }
.cm-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 21, 39, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.cm-modal__card {
  position: relative;
  width: 100%;
  max-width: 620px;
  max-height: calc(100vh - 2.4rem);
  overflow: auto;
  background: var(--white, #fff);
  border-radius: 18px;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45);
  animation: cmModalIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes cmModalIn {
  from { opacity: 0; transform: translateY(22px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.cm-modal__close {
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--blue-soft, #e8f4fb);
  color: var(--navy-900, #0b1f3a);
  border-radius: 50%;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}
.cm-modal__close:hover { background: #d3ebf9; }
.cm-modal__body { padding: 2.2rem 2.4rem 2.4rem; }
.cm-modal__eyebrow { margin-bottom: 0.5rem; }
.cm-modal__title {
  font-family: var(--font-head, sans-serif);
  font-size: 1.55rem;
  color: var(--navy-900, #0b1f3a);
  margin: 0 0 0.4rem;
}
.cm-modal__sub { font-size: 0.92rem; color: var(--muted, #5b6b7f); margin: 0 0 1.5rem; }

#cmLeadForm label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy-800, #0f2a4d);
  margin-bottom: 1rem;
}
#cmLeadForm input[type="text"],
#cmLeadForm input[type="email"],
#cmLeadForm input[type="tel"],
#cmLeadForm textarea {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.7rem 0.95rem;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--ink, #22374e);
  background: var(--bg-tint, #f4f8fb);
  border: 1px solid var(--line, #dde6ee);
  border-radius: 10px;
  box-sizing: border-box;
}
#cmLeadForm input:focus,
#cmLeadForm textarea:focus {
  outline: none;
  border-color: var(--blue, #2aa7e0);
  box-shadow: 0 0 0 3px rgba(42, 167, 224, 0.16);
  background: var(--white, #fff);
}
#cmLeadForm textarea { resize: vertical; min-height: 96px; }
.cm-modal__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.cm-modal__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.cm-modal__check {
  display: flex !important;
  align-items: center;
  gap: 0.55rem;
  font-weight: 500 !important;
  color: var(--muted, #5b6b7f) !important;
  cursor: pointer;
}
.cm-modal__check input { width: auto !important; margin: 0 !important; accent-color: var(--blue, #2aa7e0); }
.cm-modal__error {
  background: #fdecec;
  border: 1px solid #f5c6c6;
  color: #a13030;
  border-radius: 10px;
  padding: 0.65rem 0.95rem;
  font-size: 0.88rem;
  margin: 0 0 1rem;
}
.cm-modal__submit { width: 100%; justify-content: center; font-size: 0.95rem; padding: 0.95rem 1.5rem; }
.cm-modal__submit[disabled] { opacity: 0.6; pointer-events: none; }

.cm-modal__success { text-align: center; padding: 1.4rem 0 0.4rem; }
.cm-modal__success-icon {
  width: 74px;
  height: 74px;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--blue-soft, #e8f4fb);
  color: var(--blue-dark, #1273b8);
}
.cm-modal__success-icon svg { width: 34px; height: 34px; }
.cm-modal__success h3 {
  font-family: var(--font-head, sans-serif);
  color: var(--navy-900, #0b1f3a);
  font-size: 1.3rem;
  margin: 0 0 0.5rem;
}
.cm-modal__success p { color: var(--muted, #5b6b7f); font-size: 0.93rem; margin: 0 0 1.4rem; }

body.cm-modal-open { overflow: hidden; }

@media (max-width: 560px) {
  .cm-modal__row { grid-template-columns: 1fr; gap: 0; }
  .cm-modal__body { padding: 1.7rem 1.4rem 1.8rem; }
}
