/* =============================================
   OJG CONSULTATION POPUP FORM — popup.css
   Namespace: #ojgPopupForm
   ============================================= */

#ojgPopupForm {
  font-family: "Poppins", sans-serif;
}

#ojgPopupForm input,
#ojgPopupForm textarea,
#ojgPopupForm select,
#ojgPopupForm button,
#ojgPopupForm label,
#ojgPopupForm div,
#ojgPopupForm span,
#ojgPopupForm p,
#ojgPopupForm a {
  font-family: "Poppins", sans-serif;
}

#ojgPopupForm * {
  box-sizing: border-box;
}

/* Make sure icons always use the Font Awesome icon font,
   never get overridden by the Poppins rule above.
   FontAwesome solid icons specifically require font-weight:900
   — without it, browsers can silently fail to render the glyph. */
#ojgPopupForm i.fa-solid,
#ojgPopupForm i.fa-brands,
#ojgPopupForm i[class*="fa-"] {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
  font-style: normal !important;
  -webkit-font-smoothing: antialiased;
  display: inline-block;
}

#ojgPopupForm i.fa-brands {
  font-family: "Font Awesome 6 Brands" !important;
  font-weight: 400 !important;
}

/* ── Overlay ── */
#ojgPopupForm .ojgPopupForm-overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 36, 47, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

#ojgPopupForm .ojgPopupForm-overlay.ojgPopupForm-active {
  opacity: 1;
  visibility: visible;
}

/* ── Modal wrapper ── */
#ojgPopupForm .ojgPopupForm-modal {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(24px) scale(0.97);
  transition: transform 0.35s ease;
}

#ojgPopupForm .ojgPopupForm-overlay.ojgPopupForm-active .ojgPopupForm-modal {
  transform: translateY(0) scale(1);
}

#ojgPopupForm .ojgPopupForm-modal::-webkit-scrollbar {
  width: 6px;
}

#ojgPopupForm .ojgPopupForm-modal::-webkit-scrollbar-thumb {
  background: #cfe3fb;
  border-radius: 6px;
}

/* ── Close button ── */
#ojgPopupForm .ojgPopupForm-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f4f8ff;
  border: 1.5px solid #dce9f8;
  color: #5a6a85;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  text-decoration: none;
  transition: 0.25s ease;
  z-index: 2;
}

#ojgPopupForm .ojgPopupForm-close:hover {
  background: #0978ef;
  border-color: #0978ef;
  color: #fff;
  transform: rotate(90deg);
}

/* ── Form card (same visual language as your hero form) ── */
#ojgPopupForm .form-card {
  background: rgba(255, 255, 255, 0.98);
  border: 1.5px solid #dce9f8;
  border-radius: 24px;
  padding: 36px 32px 32px;
  box-shadow:
    0 30px 70px rgba(9, 120, 239, 0.18),
    0 8px 24px rgba(0, 0, 0, 0.12);
  position: relative;
  overflow: hidden;
}

#ojgPopupForm .form-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #0978ef, #014392);
  border-radius: 24px 24px 0 0;
}

#ojgPopupForm .form-header {
  margin-bottom: 24px;
  padding-right: 30px;
}

#ojgPopupForm .form-title {
  font-family: "Urbanist", sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #07242f;
  margin-bottom: 6px;
}

#ojgPopupForm .form-subtitle {
  font-size: 13px;
  color: #5a6a85;
  line-height: 1.6;
}

/* Input groups */
#ojgPopupForm .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

#ojgPopupForm .form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}

#ojgPopupForm .form-group.no-mb {
  margin-bottom: 0;
}

#ojgPopupForm .form-label {
  font-size: 12px;
  font-weight: 600;
  color: #0a1f44;
  letter-spacing: 0.3px;
}

#ojgPopupForm .input-wrap {
  position: relative;
}

#ojgPopupForm .input-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: #a0aec0;
  pointer-events: none;
  transition: color 0.2s;
}

#ojgPopupForm .input-wrap.ta i {
  top: 16px;
  transform: none;
}

#ojgPopupForm .form-input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  font-family: "Poppins", sans-serif;
  font-size: 13.5px;
  color: #07242f;
  background: #f7faff;
  border: 1.5px solid #dce9f8;
  border-radius: 10px;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s;
  appearance: none;
  display: block;
}

#ojgPopupForm .form-input::placeholder {
  color: #a0aec0;
  font-size: 13px;
}

#ojgPopupForm .form-input:focus {
  border-color: #0978ef;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(9, 120, 239, 0.12);
}

#ojgPopupForm .input-wrap:focus-within i {
  color: #0978ef;
}

#ojgPopupForm .form-textarea {
  width: 100%;
  padding: 12px 14px 12px 40px;
  font-family: "Poppins", sans-serif;
  font-size: 13.5px;
  color: #07242f;
  background: #f7faff;
  border: 1.5px solid #dce9f8;
  border-radius: 10px;
  outline: none;
  resize: vertical;
  min-height: 96px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s;
  line-height: 1.6;
}

#ojgPopupForm .form-textarea::placeholder {
  color: #a0aec0;
  font-size: 13px;
}

#ojgPopupForm .form-textarea:focus {
  border-color: #0978ef;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(9, 120, 239, 0.12);
}

/* Validation states */
#ojgPopupForm .form-input.error,
#ojgPopupForm .form-textarea.error {
  border-color: #e53e3e;
  background: #fff5f5;
}

#ojgPopupForm .form-input.success,
#ojgPopupForm .form-textarea.success {
  border-color: #38a169;
  background: #f0fff4;
}

#ojgPopupForm .error-msg {
  font-size: 11px;
  color: #e53e3e;
  margin-top: 4px;
  display: none;
  align-items: center;
  gap: 4px;
}

#ojgPopupForm .error-msg.show {
  display: flex;
}

#ojgPopupForm .error-msg i {
  font-size: 11px;
}

/* Phone with country code */
#ojgPopupForm .phone-row {
  display: flex;
  gap: 8px;
}

#ojgPopupForm .phone-code-select {
  padding: 12px 10px 12px 14px;
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  color: #07242f;
  background: #f7faff;
  border: 1.5px solid #dce9f8;
  border-radius: 10px;
  outline: none;
  width: 100px;
  flex-shrink: 0;
  cursor: pointer;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

#ojgPopupForm .phone-code-select:focus {
  border-color: #0978ef;
  box-shadow: 0 0 0 3px rgba(9, 120, 239, 0.12);
}

#ojgPopupForm .phone-input-wrap {
  flex: 1;
}

/* Select field */
#ojgPopupForm .form-select {
  width: 100%;
  padding: 12px 14px 12px 40px;
  font-family: "Poppins", sans-serif;
  font-size: 13.5px;
  color: #07242f;
  background: #f7faff;
  border: 1.5px solid #dce9f8;
  border-radius: 10px;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235a6a85' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

#ojgPopupForm .form-select:focus {
  border-color: #0978ef;
  box-shadow: 0 0 0 3px rgba(9, 120, 239, 0.12);
}

/* Submit button */
#ojgPopupForm .btn-submit {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #0978ef, #014392);
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
  transition:
    transform 0.25s,
    box-shadow 0.25s,
    opacity 0.25s;
  box-shadow: 0 6px 24px rgba(9, 120, 239, 0.35);
  position: relative;
  overflow: hidden;
}

#ojgPopupForm .btn-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

#ojgPopupForm .btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(9, 120, 239, 0.45);
}

#ojgPopupForm .btn-submit:hover::before {
  opacity: 1;
}

#ojgPopupForm .btn-submit:active {
  transform: scale(0.98);
}

#ojgPopupForm .btn-submit i {
  font-size: 17px;
  transition: transform 0.25s;
}

#ojgPopupForm .btn-submit:hover i {
  transform: translateX(4px);
}

#ojgPopupForm .btn-submit.loading {
  pointer-events: none;
  opacity: 0.8;
}

#ojgPopupForm .spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ojgPopupForm-spin 0.7s linear infinite;
  display: none;
}

#ojgPopupForm .btn-submit.loading .spinner {
  display: block;
}

#ojgPopupForm .btn-submit.loading .btn-text,
#ojgPopupForm .btn-submit.loading .btn-icon {
  display: none;
}

@keyframes ojgPopupForm-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Success state */
#ojgPopupForm .form-success {
  display: none;
  text-align: center;
  padding: 32px 16px;
  animation: ojgPopupForm-fadeUp 0.4s ease both;
}

#ojgPopupForm .form-success.show {
  display: block;
}

#ojgPopupForm .success-icon {
  width: 64px;
  height: 64px;
  background: #e8f3ff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

#ojgPopupForm .success-icon i {
  font-size: 28px;
  color: #0978ef;
}

#ojgPopupForm .success-title {
  font-family: "Urbanist", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #07242f;
  margin-bottom: 8px;
}

#ojgPopupForm .success-msg {
  font-size: 13px;
  color: #5a6a85;
  line-height: 1.6;
}

#ojgPopupForm .privacy-note {
  text-align: center;
  font-size: 11px;
  color: #a0aec0;
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

#ojgPopupForm .privacy-note i {
  font-size: 12px;
  color: #0978ef;
}

@keyframes ojgPopupForm-fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Responsive ── */

@media (max-width: 600px) {
  #ojgPopupForm .ojgPopupForm-overlay {
    padding: 14px;
    align-items: flex-end;
  }

  #ojgPopupForm .ojgPopupForm-modal {
    max-height: 92vh;
  }

  #ojgPopupForm .form-card {
    padding: 28px 20px 24px;
    border-radius: 20px;
  }

  #ojgPopupForm .form-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  #ojgPopupForm .form-title {
    font-size: 19px;
  }

  #ojgPopupForm .ojgPopupForm-close {
    top: 14px;
    right: 14px;
  }
}

@media (max-width: 380px) {
  #ojgPopupForm .phone-code-select {
    width: 84px;
  }
}
