/* === forms.css === */

/* 1) Form container */
.form-container {
  position: absolute;        /* take it out of normal flow */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;

  width: 90%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.85);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);

  text-align: center;
}

/* 2) Form title */
.form-container h2 {
  margin-bottom: 1.5rem;
  font-size: 2rem;
  text-align: center;
  color: #333;
}

/* 3) Form group: label + control */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #555;
  text-align: left;
}

.form-container input,
.form-container textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}
/* 4) Common control styles for inputs & textarea */
.form-container input[list],
.form-container input[type="text"],
.form-container input[type="email"],
.form-container input[type="password"],
.form-container textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.4;
  box-sizing: border-box;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

/* 4a) Textarea specific */
.form-container textarea {
  min-height: 160px; /* adjust to match two standard inputs */
  resize: vertical; /* allow user to expand if needed */
}

/* 5) Focus state */
.form-container input:focus,
.form-container textarea:focus {
  border-color: #4a90e2;
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.25);
}

/* 6) Submit button — match input width & use off-black */
.form-container button {
  display: block;
  width: 100%;
  padding: 0.85rem 1rem;
  margin-top: 1rem;

  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.4;

  background-color: #2a2a2a; /* deep charcoal */
  color: #fff;
  border: none;
  border-radius: 6px;

  cursor: pointer;
  transition: background-color 0.2s ease;
}

.form-container button:hover {
  background-color: #444;    /* slightly lighter on hover */
}

/* 7) Error message styling */
.form-container .error {
  color: #c00;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

/* 8) Responsive: full-width on narrow viewports */
@media (max-width: 500px) {
  .form-container {
    position: fixed;
    top: 60px;
    bottom: 1rem;
    right: 1rem;
    left: auto;
    transform: none;
    margin: 2rem auto;
    max-height: none;
    overflow: visible;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1.5rem;
  }
  .contact-page {
    padding: 2rem 1rem;
  }
}
