/* ==========================================================================
   Noble Callista — Global Lead-Capture Popup
   Loaded on every page via include/include.js
   ========================================================================== */

.nc-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(17, 17, 17, 0.72);
  opacity: 0;
  visibility: hidden;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.nc-popup-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.nc-popup-box {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 96vh;
  overflow: hidden;
  background: var(--theme-color-white, #fff);
  border-radius: 18px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
  padding: clamp(34px, 6vw, 48px) clamp(20px, 4vw, 34px) clamp(28px, 5vw, 38px);
  text-align: center;
  transform: translateY(24px) scale(0.96);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.4s ease;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-family: var(--body-font-family, inherit);
}

.nc-popup-overlay.is-active .nc-popup-box {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.nc-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: var(--theme-color-gray, #f6f6f6);
  color: var(--theme-color-dark, #111);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nc-popup-close:hover {
  background: var(--theme-color-dark, #111);
  color: #fff;
  transform: rotate(90deg);
}

.nc-popup-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px;
}

.nc-popup-logo img {
  max-height: 84px;
  width: auto;
  object-fit: contain;
}

.nc-popup-title {
  font-size: clamp(19px, 3vw, 24px);
  font-weight: 600;
  color: var(--headings-color, #111);
  margin: 0;
  line-height: 1.3;
}

.nc-popup-sub {
  font-size: 14px;
  color: var(--text-color, #6b6b6b);
  margin: 0 0 4px;
  line-height: 1.5;
}

.nc-popup-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.nc-popup-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.nc-popup-field {
  position: relative;
  text-align: left;
}

.nc-popup-field input,
.nc-popup-field textarea {
  width: 100%;
  border: 1px solid var(--theme-color3, #e3e5dd);
  background: var(--theme-color-light, #f7f7f5);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 14px;
  font-family: inherit;
  color: var(--headings-color, #111);
  outline: none;
  resize: none;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.nc-popup-field textarea {
  min-height: 68px;
  max-height: 84px;
}

.nc-popup-field input::placeholder,
.nc-popup-field textarea::placeholder {
  color: #9a9a95;
}

.nc-popup-field input:focus,
.nc-popup-field textarea:focus {
  border-color: var(--theme-color-dark, #111);
  background: #fff;
}

.nc-popup-submit {
  margin-top: 6px;
  width: 100%;
  border: none;
  border-radius: 10px;
  background: var(--theme-color1, #124441);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.02em;
  padding: 15px 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.25s ease, transform 0.15s ease;
}

.nc-popup-submit:hover {
  background: var(--theme-color2, #C59D57);
  color: var(--theme-color2-text-color, #124441);
}

.nc-popup-submit:active {
  transform: scale(0.98);
}

.nc-popup-note {
  font-size: 11.5px;
  color: #9a9a95;
  margin-top: 2px;
}

/* Success state */
.nc-popup-success {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px 4px 6px;
}

.nc-popup-success i {
  font-size: 42px;
  color: #2e9e5b;
}

.nc-popup-success p {
  margin: 0;
  font-size: 15px;
  color: var(--headings-color, #111);
  line-height: 1.6;
}

.nc-popup-box.is-submitted .nc-popup-form,
.nc-popup-box.is-submitted .nc-popup-title,
.nc-popup-box.is-submitted .nc-popup-sub {
  display: none;
}

.nc-popup-box.is-submitted .nc-popup-success {
  display: flex;
}

/* Lock background scroll while popup is open */
body.nc-popup-open {
  overflow: hidden;
}

/* Small phones — tighten spacing so everything still fits one screen, no scrollbar */
@media (max-height: 700px), (max-width: 380px) {
  .nc-popup-box {
    gap: 10px;
    padding: 20px 18px 16px;
  }
  .nc-popup-logo img {
    max-height: 52px;
  }
  .nc-popup-title {
    font-size: 18px;
  }
  .nc-popup-sub {
    font-size: 12.5px;
    margin-bottom: 0;
  }
  .nc-popup-field input,
  .nc-popup-field textarea {
    padding: 10px 12px;
    font-size: 13px;
  }
  .nc-popup-field textarea {
    min-height: 46px;
    max-height: 56px;
  }
  .nc-popup-submit {
    padding: 12px 16px;
    font-size: 14px;
  }
}

@media (max-width: 380px) {
  .nc-popup-row {
    grid-template-columns: 1fr;
  }
}
