/* ---------- Consultation popup ---------- */
.cpop-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(8, 12, 30, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cpop-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cpop-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #ffffff;
  color: #1a1a1a;
  border-radius: 16px;
  padding: 32px 28px 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.3s ease;
}

.cpop-overlay.open .cpop-card {
  transform: translateY(0) scale(1);
}

.cpop-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: #f0f0f0;
  color: #1a1a1a;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.cpop-close:hover {
  background: #e0e0e0;
}

.cpop-header {
  padding-right: 30px;
}

.cpop-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
}

.cpop-subtitle {
  margin-top: 6px;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  color: #666;
}

.cpop-subtitle strong {
  color: #1a1a1a;
}

.cpop-form {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cpop-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cpop-group > label {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #1a1a1a;
}

.cpop-group input[type="text"],
.cpop-group input[type="tel"],
.cpop-group select {
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px 12px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: #1a1a1a;
  transition: all 0.2s ease;
}

.cpop-group input:focus,
.cpop-group select:focus {
  outline: none;
  background: #fff;
  border-color: #1a1a1a;
}

.cpop-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.cpop-group input.invalid {
  border-color: #d32f2f;
  background: #fff5f5;
}

.cpop-error {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  color: #d32f2f;
}

.cpop-error:empty {
  display: none;
}

.cpop-radio-group {
  display: flex;
  gap: 20px;
}

.cpop-radio {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
}

.cpop-radio input {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #1a1a1a;
}

.cpop-terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 1.5;
  color: #666;
}

.cpop-terms input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: #1a1a1a;
}

.cpop-submit {
  margin-top: 4px;
  width: 100%;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  background: #1a1a1a;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.cpop-submit:hover {
  background: #333;
  transform: translateY(-2px);
}

/* ---------- Email field ---------- */
.cpop-group input[type="email"] {
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px 12px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: #1a1a1a;
  transition: all 0.2s ease;
}

/* ---------- Thank-you glass card ---------- */
.cpop-thanks {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: 20px;
  padding: 44px 28px;
  color: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.cpop-thanks[hidden] { display: none; }

.cpop-thanks-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #2e7d5b;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cpop-thanks-title {
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}

.cpop-thanks-text {
  margin-top: 10px;
  max-width: 340px;
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
}

.cpop-thanks-btn {
  margin-top: 24px;
  min-width: 160px;
  padding: 12px 32px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.25s ease, border-color 0.25s ease;
}

.cpop-thanks-btn:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.55);
}

@media (max-width: 520px) {
  .cpop-card { padding: 28px 20px 22px; }
  .cpop-title { font-size: 18px; }
  .cpop-radio-group { flex-direction: column; gap: 10px; }

  .cpop-group input[type="text"],
  .cpop-group input[type="tel"],
  .cpop-group input[type="email"],
  .cpop-group select {
    font-size: 16px;
  }

  .cpop-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
  }

  .cpop-header { padding-right: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .cpop-overlay,
  .cpop-card { transition: none; }
}