/* App-specific tweaks beyond Tailwind */

/* Make form controls look consistent. WTForms renders <input>, <select>,
   <textarea> without classes, so we style them globally. */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="search"],
input[type="tel"],
input[type="url"],
select,
textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #fff;
  font-size: 0.875rem;
  transition: border-color 120ms, box-shadow 120ms;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
input[disabled],
select[disabled],
textarea[disabled] {
  background: #f1f5f9;
  color: #64748b;
}
textarea {
  min-height: 5rem;
  resize: vertical;
}

/* Status pills (used in tables and detail headers). */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.15rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}
.pill-Pre-Intake       { background: #fef3c7; color: #854d0e; }
.pill-In-Our-Care      { background: #e0f2fe; color: #075985; }
.pill-Adoption         { background: #ede9fe; color: #5b21b6; }
.pill-Medical-Adoption { background: #fce7f3; color: #831843; }
.pill-Post-Adoption    { background: #d1fae5; color: #065f46; }
.pill-Complete         { background: #dcfce7; color: #166534; }
.pill-Deceased         { background: #fee2e2; color: #991b1b; }

/* Notes block: preserve newlines from the spreadsheet. */
.notes-block {
  white-space: pre-wrap;
  background: #f8fafc;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Buttons. Keep semantics compatible with raw <button> + Tailwind. */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: #4f46e5;
  color: #fff;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid #4f46e5;
  cursor: pointer;
  transition: background 120ms;
}
.btn-primary:hover { background: #4338ca; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: #fff;
  color: #334155;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  transition: background 120ms;
}
.btn-secondary:hover { background: #f8fafc; }

.btn-danger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: #fff;
  color: #be123c;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid #fecdd3;
  cursor: pointer;
  transition: background 120ms;
}
.btn-danger:hover { background: #fff1f2; }

/* Cards */
.card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
}
.card-header {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 600;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-body { padding: 1.25rem; }

/* Field label/value used on detail pages. */
.field-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.25rem;
}
.field-value {
  font-size: 0.875rem;
  color: #0f172a;
}
.field-value .empty { color: #94a3b8; font-style: italic; }
