/* oAT Contact Form Modal */

/* Overlay */
.oat-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 36, 40, 0.82);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.oat-modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* Container */
.oat-modal {
  background: #FDFCF8;
  border: 2px solid #193A40;
  width: 100%;
  max-width: 520px;
  position: relative;
  transform: scale(0.96) translateY(8px);
  transition: transform 0.25s ease;
  max-height: 90vh;
  overflow-y: auto;
}

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

/* Header bar */
.oat-modal-header {
  background: #193A40;
  padding: 20px 28px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.oat-modal-title {
  font-family: 'Oswald', 'Arial Narrow', Arial, sans-serif;
  font-size: 32px;
  font-weight: 600;
  color: #FDFCF8;
  letter-spacing: 0.03em;
  line-height: 1;
  text-transform: uppercase;
}

.oat-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #FDFCF8;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.15s;
  font-size: 20px;
  line-height: 1;
  font-family: 'Space Mono', monospace;
}

.oat-modal-close:hover { opacity: 1; }
.oat-modal-close:focus-visible {
  outline: 2px solid #FF5024;
  outline-offset: 2px;
}

/* Body */
.oat-modal-body {
  padding: 28px 28px 32px;
}

/* Form fields */
.oat-form-group {
  margin-bottom: 20px;
}

.oat-form-label {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #4A6668;
  margin-bottom: 6px;
}

.oat-form-label .oat-required {
  color: #FF5024;
  margin-left: 2px;
}

.oat-form-input,
.oat-form-textarea {
  width: 100%;
  background: #FDFCF8;
  border: 1.5px solid #193A40;
  color: #193A40;
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  border-radius: 0;
}

.oat-form-input:focus,
.oat-form-textarea:focus {
  border-color: #FF5024;
  box-shadow: 0 0 0 2px rgba(255, 80, 36, 0.12);
}

.oat-form-input::placeholder,
.oat-form-textarea::placeholder {
  color: #4A6668;
  opacity: 0.55;
}

.oat-form-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

/* Privacy checkbox */
.oat-form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 24px;
}

.oat-form-check input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  min-width: 18px;
  border: 1.5px solid #193A40;
  background: #FDFCF8;
  cursor: pointer;
  margin-top: 1px;
  position: relative;
  transition: background 0.15s, border-color 0.15s;
  border-radius: 0;
}

.oat-form-check input[type="checkbox"]:checked {
  background: #193A40;
  border-color: #193A40;
}

.oat-form-check input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: 2px solid #FDFCF8;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.oat-form-check input[type="checkbox"]:focus-visible {
  outline: 2px solid #FF5024;
  outline-offset: 2px;
}

.oat-form-check-label {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  color: #193A40;
  line-height: 1.5;
  cursor: pointer;
}

.oat-form-check-label a {
  color: #FF5024;
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

.oat-form-check-label a:hover { text-decoration-thickness: 2px; }

/* Submit button */
.oat-form-submit {
  width: 100%;
  background: #FF5024;
  color: #FDFCF8;
  border: none;
  font-family: 'Oswald', 'Arial Narrow', Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 14px 24px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  border-radius: 0;
}

.oat-form-submit:hover:not(:disabled) {
  background: #e04318;
}

.oat-form-submit:active:not(:disabled) {
  transform: translateY(1px);
}

.oat-form-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.oat-form-submit:focus-visible {
  outline: 2px solid #193A40;
  outline-offset: 2px;
}

/* Error message */
.oat-form-error {
  background: rgba(255, 80, 36, 0.1);
  border: 1px solid #FF5024;
  color: #FF5024;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  padding: 10px 12px;
  margin-bottom: 16px;
  display: none;
}

.oat-form-error.is-visible { display: block; }

/* Success state */
.oat-modal-success {
  padding: 40px 28px;
  text-align: center;
  display: none;
}

.oat-modal-success.is-visible { display: block; }

.oat-modal-success-icon {
  font-size: 40px;
  margin-bottom: 16px;
  color: #193A40;
}

.oat-modal-success h3 {
  font-family: 'Oswald', 'Arial Narrow', Arial, sans-serif;
  font-size: 28px;
  font-weight: 600;
  color: #193A40;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.oat-modal-success p {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  color: #4A6668;
  line-height: 1.6;
}

/* Optional label */
.oat-form-optional {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  color: #4A6668;
  opacity: 0.6;
  margin-left: 4px;
}

/* Mobile */
@media (max-width: 600px) {
  .oat-modal-overlay { padding: 0; align-items: flex-end; }
  .oat-modal {
    max-height: 95vh;
    border-left: none;
    border-right: none;
    border-bottom: none;
  }
  .oat-modal-title { font-size: 26px; }
  .oat-modal-body { padding: 20px 20px 28px; }
  .oat-modal-header { padding: 16px 20px 14px; }
}
