/* Contact Modal Styles */

.contact-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.contact-modal.active {
  opacity: 1;
  visibility: visible;
}

.contact-modal .modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(2px);
}

.contact-modal .modal-content {
  position: relative;
  background: #fff;
  border-radius: 1em;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 560px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.contact-modal .modal-close {
  position: absolute;
  top: 1.5em;
  right: 1.5em;
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.5em;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: color 0.2s ease;
}

.contact-modal .modal-close:hover {
  color: #475569;
}

.contact-modal .modal-body {
  padding: 2em;
}

.contact-modal .modal-intro {
  padding-right: 2.5em;
  margin-bottom: 1.5em;
}

.contact-modal .modal-kicker {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  margin-bottom: .6em;
  font-size: .78em;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary);
}

.contact-modal .modal-intro h2 {
  margin-bottom: .5em;
  font-size: 1.45rem;
  line-height: 1.2;
}

.contact-modal .modal-intro p:last-child {
  color: #64748b;
  margin-bottom: 0;
  font-size: .95rem;
}

.contact-modal .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1em;
}

.contact-modal .form-group {
  margin-bottom: 1.05em;
}

.contact-modal .form-label {
  display: block;
  margin-bottom: 0.4em;
  font-weight: 600;
  font-size: 0.875em;
  color: #374151;
}

.contact-modal .form-label span {
  color: var(--primary);
}

.contact-modal .form-control,
.contact-modal .form-select,
.contact-modal .form-textarea {
  width: 100%;
  padding: 0.75em 1em;
  border: 1px solid #e2e8f0;
  border-radius: 0.5em;
  font-family: inherit;
  font-size: 0.95rem;
  color: #374151;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
}

.contact-modal .form-control::placeholder,
.contact-modal .form-textarea::placeholder {
  color: #94a3b8;
}

.contact-modal .form-control:focus,
.contact-modal .form-select:focus,
.contact-modal .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(209, 54, 54, 0.1);
}

.contact-modal .form-textarea {
  resize: vertical;
  min-height: 110px;
}

.contact-modal .form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1em center;
  padding-right: 2.5em;
}

.contact-modal .form-submit {
  width: 100%;
  padding: 0.95em 1em;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 0.625em;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.contact-modal .form-submit:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.contact-modal .form-alert {
  padding: .8em 1em;
  border-radius: .6em;
  margin-bottom: 1em;
  font-size: .92rem;
}

.contact-modal .form-alert.success {
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #86efac;
}

.contact-modal .form-alert.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* Responsive */
@media (max-width: 640px) {
  .contact-modal .modal-content {
    width: 100%;
    max-height: 100vh;
    border-radius: 1em 1em 0 0;
    animation: slideUp 0.3s ease;
  }

  @keyframes slideUp {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
  }

  .contact-modal .modal-body {
    padding: 1.5em 1em;
  }

  .contact-modal .modal-intro {
    padding-right: 2em;
    margin-bottom: 1.2em;
  }

  .contact-modal .modal-intro h2 {
    font-size: 1.25rem;
  }

  .contact-modal .modal-close {
    top: 1em;
    right: 1em;
  }
}

/* Form adjustments inside modal */
.contact-modal .form-row {
  grid-template-columns: 1fr;
}

@media (min-width: 480px) {
  .contact-modal .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* Focus states for accessibility */
.contact-modal .modal-close:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.contact-modal .form-control:focus,
.contact-modal .form-select:focus,
.contact-modal .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(209, 54, 54, 0.1);
}

/* Hide trust badges in modal */
.contact-modal .trust-badges {
  display: none;
}
