/* Porchlight Chapters — form & search field styles */

#pick-form,
#pick-form .field,
#panel-find .field {
  background: var(--parchment-card, #faf3e3);
  box-shadow: 0 2px 10px rgba(43, 43, 38, 0.14);
  border-radius: 4px;
}

#pick-form {
  padding: 20px 16px 24px;
  clip-path: polygon(0 14px, 14px 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

#pick-form .field,
#panel-find .field {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  margin-bottom: 22px;
}

#pick-form label,
#panel-find label {
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #1f5f5b;
  margin-bottom: 8px;
}

#pick-form label .req { color: #d96c4a; }
#pick-form label .opt {
  text-transform: none;
  letter-spacing: 0;
  color: #6b6558;
  font-style: italic;
  font-size: 0.78rem;
}

#pick-form input,
#pick-form textarea,
#panel-find input {
  display: block;
  width: 100%;
  min-height: 48px;
  font-family: inherit;
  font-size: 1.05rem;
  color: #2b2b26;
  background: #fdfaf2;
  border: 1.5px solid rgba(31, 95, 91, 0.45);
  border-radius: 4px;
  padding: 12px 14px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

#pick-form textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
}

#pick-form input:focus,
#pick-form textarea:focus,
#panel-find input:focus {
  border-color: #1f5f5b;
  box-shadow: 0 0 0 3px rgba(31, 95, 91, 0.18);
}

#pick-form input.invalid {
  border-color: #d96c4a;
  box-shadow: 0 0 0 3px rgba(217, 108, 74, 0.18);
}

#pick-form input[type="date"] {
  min-height: 48px;
}

.error {
  margin-top: 8px;
  font-size: 0.85rem;
  color: #b34e31;
  font-style: italic;
}

.error[hidden] { display: none; }

.form-error {
  margin: 0 0 16px;
  font-size: 0.9rem;
  color: #b34e31;
  font-weight: bold;
}

.form-error[hidden] { display: none; }

.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary {
  flex: 1 1 160px;
  min-height: 52px;
  border: none;
  border-radius: 4px;
  background: #1f5f5b;
  color: #f3e8d0;
  font-family: inherit;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), 50% 100%, 0 calc(100% - 10px));
  padding: 12px 18px 18px;
}

.btn-primary:active { background: #174744; }

.btn-ghost {
  flex: 0 1 auto;
  min-height: 52px;
  border: 1.5px solid #1f5f5b;
  border-radius: 4px;
  background: transparent;
  color: #1f5f5b;
  font-family: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 12px 18px;
}

.btn-ghost:active { background: rgba(31, 95, 91, 0.12); }

.btn-ghost[hidden] { display: none; }

/* search field sits directly on the page, not in a card */
#panel-find .field {
  margin-bottom: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
