/* ═══════════════════════════════════════════════════════
   EIN FORMS — Modal overlay, form styling
   ═══════════════════════════════════════════════════════ */

/* Overlay */
.ein-form-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 26, 43, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99998;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
  animation: einFormFadeIn 0.25s ease;
}
.ein-form-overlay.active {
  display: flex;
}
@keyframes einFormFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Modal card */
.ein-form-modal {
  background: #F4F2ED;
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  animation: einFormSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes einFormSlideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Close button */
.ein-form-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #0F1A2B;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 2;
  font-family: inherit;
  line-height: 1;
}
.ein-form-close:hover {
  background: rgba(15, 26, 43, 0.08);
  transform: rotate(90deg);
}

/* Form header */
.ein-form-header {
  padding: 48px 56px 28px;
  border-bottom: 1px solid rgba(15, 26, 43, 0.08);
}
.ein-form-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #9a8660;
  margin-bottom: 14px;
}
.ein-form-tag-bar {
  width: 24px;
  height: 2px;
  background: #9a8660;
}
.ein-form-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 36px;
  font-weight: 500;
  color: #0F1A2B;
  line-height: 1.15;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.ein-form-title em {
  font-style: italic;
  color: #9a8660;
}
.ein-form-subtitle {
  font-family: "Jost", sans-serif;
  font-size: 14px;
  color: rgba(15, 26, 43, 0.65);
  line-height: 1.55;
  margin: 0;
  font-weight: 300;
}

/* Form body */
.ein-form-body {
  padding: 28px 56px 40px;
}

/* Field group */
.ein-field-group {
  margin-bottom: 20px;
}
.ein-field-group:last-child {
  margin-bottom: 0;
}
.ein-field-label {
  display: block;
  font-family: "DM Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(15, 26, 43, 0.7);
  margin-bottom: 8px;
  font-weight: 400;
}
.ein-field-required {
  color: #9a8660;
  margin-left: 3px;
}

/* Inputs */
.ein-field-input,
.ein-field-select,
.ein-field-textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: "Jost", sans-serif;
  font-size: 15px;
  color: #0F1A2B;
  background: #fff;
  border: 1px solid rgba(15, 26, 43, 0.15);
  border-radius: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-weight: 400;
  box-sizing: border-box;
}
.ein-field-input:focus,
.ein-field-select:focus,
.ein-field-textarea:focus {
  outline: none;
  border-color: #9a8660;
  box-shadow: 0 0 0 3px rgba(154, 134, 96, 0.15);
}
.ein-field-textarea {
  min-height: 110px;
  resize: vertical;
  font-family: "Jost", sans-serif;
  line-height: 1.5;
}
.ein-field-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%239a8660' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

/* Two-column row */
.ein-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 520px) {
  .ein-field-row {
    grid-template-columns: 1fr;
  }
}

/* Honeypot field — hidden from users */
.ein-field-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Submit button */
.ein-form-actions {
  margin-top: 28px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  align-items: center;
}
.ein-btn-submit {
  background: #0F1A2B;
  color: #F4F2ED;
  border: none;
  padding: 14px 36px;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  cursor: pointer;
  transition: background 0.2s;
}
.ein-btn-submit:hover:not(:disabled) {
  background: #9a8660;
}
.ein-btn-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Status messages */
.ein-form-status {
  margin-top: 16px;
  padding: 14px 18px;
  font-family: "Jost", sans-serif;
  font-size: 14px;
  display: none;
  line-height: 1.5;
}
.ein-form-status.active {
  display: block;
}
.ein-form-status.error {
  background: rgba(226, 75, 74, 0.08);
  color: #a63030;
  border-left: 3px solid #e24b4a;
}

/* Success state — replaces form */
.ein-form-success {
  padding: 60px 56px;
  text-align: center;
  display: none;
}
.ein-form-success.active {
  display: block;
}
.ein-form-success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 24px;
  background: #9a8660;
  color: #F4F2ED;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-family: "Cormorant Garamond", serif;
}
.ein-form-success-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 30px;
  font-weight: 500;
  color: #0F1A2B;
  margin: 0 0 12px;
  line-height: 1.2;
}
.ein-form-success-title em {
  font-style: italic;
  color: #9a8660;
}
.ein-form-success-msg {
  font-family: "Jost", sans-serif;
  font-size: 15px;
  color: rgba(15, 26, 43, 0.65);
  line-height: 1.6;
  margin: 0 0 28px;
  font-weight: 300;
}
.ein-form-success-close {
  background: transparent;
  color: #9a8660;
  border: 1px solid #9a8660;
  padding: 12px 30px;
  font-family: "DM Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.ein-form-success-close:hover {
  background: #9a8660;
  color: #F4F2ED;
}

/* Mobile adjustments */
@media (max-width: 620px) {
  .ein-form-overlay {
    padding: 0;
  }
  .ein-form-modal {
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
  }
  .ein-form-header,
  .ein-form-body,
  .ein-form-success {
    padding-left: 28px;
    padding-right: 28px;
  }
  .ein-form-header {
    padding-top: 60px;
  }
  .ein-form-title {
    font-size: 28px;
  }
  .ein-form-actions {
    flex-direction: column-reverse;
  }
  .ein-btn-submit {
    width: 100%;
    padding: 16px;
  }
}

/* Lock body scroll when modal open */
body.ein-form-open {
  overflow: hidden;
}
