
/* ---------------- Layout ---------------- */
.contact-page-wrapper {
  background-color: #f0f0f0;
  display: flex;
  justify-content: center;
  padding: 5px; 
}

/* ---------------- Main Card ---------------- */
.main-card {
  max-width: 420px;
  max-height: none;       /* remove the height limit */
  height: auto;           /* allow it to expand with content */
  padding: 5px 8px;
  margin: 10px auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 6px rgba(0,0,0,0.1);
  overflow-y: auto;             /* scroll if content exceeds max height */
}

/* ---------------- Form ---------------- */
.contact-form {
  width: 100%;
  padding: 0;
  margin: 0;
}

/* Reduce vertical spacing between fields */
.contact-form .mb-2 {
  margin-bottom: 0.2rem !important;
}

/* Make parent containers allow expansion */
.card.shadow-sm,
.card.shadow-sm .card-body,
.card.shadow-sm .flex-grow-1 {
    height: auto !important;
    max-height: none !important;
}

/* Textarea */
/* Only affect textarea in contact form 
.contact-form textarea.form-control {
    height: 400px !important;      
    min-height: 400px !important;
    max-height: none !important;
    resize: vertical;             
    overflow-y: auto;
}
*/

/* Labels */
.contact-form label {
  margin-bottom: 0.2rem !important;
  font-size: 0.85rem;
  line-height: 1.1;
}

/* Button */
.contact-form button {
  font-size: 0.8rem;
  padding: 2px 6px;
}

/* Rows */
.row.g-1 {
  row-gap: 2px;
  margin-bottom: 0 !important;
}

/* ---------------- Bootstrap Overrides ---------------- */
.form-control {
  font-size: 0.85rem;
  padding: 2px 6px !important;
  border: 1px solid #ced4da;
  border-radius: 0.3rem;
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.1rem rgba(0,123,255,0.25);
}

.form-control.is-invalid {
  border-color: red;
}

/* Success message */
.alert-success {
  margin-bottom: 2px;
  padding: 2px 6px;
}

/* ========================================== */
/* Contact page textarea height override       */
/* ========================================== */
.contact-page textarea.form-control {
  height: auto !important;      /* cancel inline height from fragment */
  min-height: 120px !important; /* desired stable height */
  resize: none;
  overflow-y: auto;
  line-height: 1.5;
}


