/* contact-modal.css - "Get in Touch" contact popup
   Design tokens mirror css/global.css so the modal reads as a native
   part of the site rather than an added component. */

.contact-modal-overlay {
  --cm-navy: #07133D;
  --cm-navy-dark: #060E2E;
  --cm-blue: #2563EB;
  --cm-blue-light: #3B82F6;
  --cm-gray: #64748B;
  --cm-slate-300: #CBD5E1;
  --cm-slate-400: #94A3B8;
  --cm-slate-900: #0F172A;
  --cm-border: #E2E8F0;
  --cm-bg: #FFFFFF;
  --cm-red: #EF4444;

  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background-color: rgba(7, 19, 61, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.contact-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Modal card */
.contact-modal {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  background-color: var(--cm-bg);
  border-radius: 28px;
  box-shadow: 0 30px 70px -20px rgba(7, 19, 61, 0.4), 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  padding: 40px 40px 36px;
  opacity: 0;
  transform: scale(0.95) translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.contact-modal-overlay.is-open .contact-modal {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Close button */
.contact-modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: none;
  border: none;
  color: var(--cm-navy);
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.contact-modal-close:hover {
  transform: rotate(90deg);
  opacity: 0.6;
}

.contact-modal-close-icon {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

/* Header */
.contact-modal-header {
  margin-bottom: 28px;
  padding-right: 24px;
}

.contact-modal-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--cm-navy);
  margin-bottom: 10px;
}

.contact-modal-subtitle {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--cm-gray);
}

/* Form */
.contact-modal-form {
  display: flex;
  flex-direction: column;
}

.contact-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 16px;
  margin-bottom: 22px;
}

.contact-form-group {
  margin-bottom: 0;
}

.contact-form-label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--cm-navy);
  margin-bottom: 8px;
}

.contact-required {
  color: var(--cm-red);
}

.contact-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.contact-input-icon {
  position: absolute;
  left: 15px;
  width: 18px;
  height: 18px;
  color: var(--cm-blue);
  pointer-events: none;
}

.contact-form-input {
  width: 100%;
  height: 50px;
  padding: 0 16px 0 44px;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--cm-slate-900);
  background-color: var(--cm-bg);
  border: 1.5px solid var(--cm-border);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form-input::placeholder {
  color: var(--cm-slate-400);
}

.contact-form-input:hover {
  border-color: var(--cm-slate-300);
}

.contact-form-input:focus {
  border-color: var(--cm-blue-light);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.contact-form-group.has-error .contact-form-input {
  border-color: var(--cm-red);
}

.contact-form-group.has-error .contact-form-input:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.contact-form-error {
  display: block;
  min-height: 0;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--cm-red);
  margin-top: 6px;
}

/* Submit button */
.contact-form-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
  padding: 15px 24px;
  background-color: var(--cm-navy);
  color: #ffffff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 10px 25px -5px rgba(7, 19, 61, 0.3);
  transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-form-submit:hover {
  background-color: var(--cm-navy-dark);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -6px rgba(7, 19, 61, 0.4);
}

.contact-form-submit:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 6px 16px -4px rgba(7, 19, 61, 0.3);
}

.contact-submit-arrow {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.contact-form-submit:hover .contact-submit-arrow {
  transform: translateX(4px);
}

.contact-form-submit:disabled {
  cursor: not-allowed;
  opacity: 0.75;
  transform: none;
}

/* Submission feedback */
.contact-form-feedback {
  min-height: 0;
  margin-top: 14px;
  font-size: 13.5px;
  font-weight: 500;
  text-align: center;
}

.contact-form-feedback.success {
  color: #16A34A;
}

.contact-form-feedback.error {
  color: var(--cm-red);
}

/* Prevent background scroll while modal is open */
body.contact-modal-open {
  overflow: hidden;
}

/* Responsive */
@media (max-width: 560px) {
  .contact-form-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 480px) {
  .contact-modal-overlay {
    padding: 16px;
  }

  .contact-modal {
    border-radius: 22px;
    padding: 32px 24px 28px;
  }

  .contact-modal-title {
    font-size: 24px;
  }

  .contact-modal-subtitle {
    font-size: 14px;
  }

  .contact-modal-close {
    top: 18px;
    right: 18px;
  }
}
