/* modal.css - fully scoped for contact modal */

.modal {
  position: fixed;
  inset: 0;
  display: none; /* hidden by default, open via #fragment */
  z-index: 999;
  font-size: 0.95rem;
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.modal:target {
  display: block;
}

/* Overlay */
.modal .backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

/* Dialog box */
.modal .dialog {
  position: relative;
  max-width: 640px;
  margin: 6vh auto;
  background: #241f75;
  color: #fff;
  border-radius: 8px;
  padding: 1.5rem 2rem 2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4em 4em;
}

/* Close button */
.modal .close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  background: transparent;
  border-radius: 4px;
}

.modal .close:hover,
.modal .close:focus {
  background: rgba(255,255,255,0.06);
  outline: none;
}

/* Modal content */
.modal .content {
  margin-top: 1rem;
}

/* Fields */
.modal .field {
  margin-bottom: 1rem;
}

.modal .input,
.modal .textarea {
  box-sizing: border-box;
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid #dcdcdc;
  border-radius: 4px;
  font: inherit;
  background: #fff;
  color: #111;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.modal .input::placeholder,
.modal .textarea::placeholder {
  color: rgba(0,0,0,0.6);
}

.modal .textarea {
  min-height: 120px;
  resize: vertical;
}

/* Hidden honeypot */
.modal .hidden {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  width: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  left: -9999px !important;
}

/* Horizontal lines */
.modal hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.3);
  margin: 1rem 0;
}

/* Legal text */
.modal .legal {
  margin: 1rem 0;
  font-size: 0.9rem;
}

.modal .legal a {
  color: #fff;
  text-decoration: underline;
}

/* Actions */
.modal .actions {
  text-align: center;
  margin-top: 1rem;
}

.modal .actions .button {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border: 2px solid #fff;
  background: transparent;
  color: #fff;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
}

.modal .actions .button:hover,
.modal .actions .button:focus {
  background: rgba(255,255,255,0.12);
  outline: none;
}

.modal .actions .privacy {
  display: block;
  margin-top: 0.75rem;
  color: #fff;
  text-decoration: underline;
}

/* Parsley validation (if used) */
.modal .parsley-error {
  background: #bfbfbf;
  border: 1px solid red;
}

.modal .parsley-errors-list {
  display: none;
}

/* Responsive */
@media (max-width: 768px) {
  .modal .dialog {
    margin: 4vh 4vw;
    padding: 3em 1rem 1.5rem;
    border-radius: 6px;
  }

  .modal .textarea {
    min-height: 100px;
  }
}
