/* Equine Capital - CSS port of the Tailwind v4 design system */

/* CSS Variables - Palette: paddock green, saddle leather, linen white, near-black ink */
:root {
  --background: #f3f4f1;
  --foreground: #171d19;
  --card: #ffffff;
  --card-foreground: #171d19;
  --popover: #ffffff;
  --popover-foreground: #171d19;
  --primary: #1e4231;
  --primary-foreground: #f3f4f1;
  --secondary: #e4e7e2;
  --secondary-foreground: #171d19;
  --muted: #e4e7e2;
  --muted-foreground: #58615b;
  --accent: #9a5b25;
  --accent-foreground: #ffffff;
  --destructive: #b42318;
  --border: #d6dad4;
  --input: #c9cec7;
  --ring: #1e4231;
  --radius: 0.5rem;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
.font-serif { font-family: 'Fraunces', Georgia, serif; }
.font-mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

.text-\[11px\] { font-size: 11px; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-6xl { font-size: 3.75rem; line-height: 1; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }

.uppercase { text-transform: uppercase; }
.italic { font-style: italic; }
.tracking-widest { letter-spacing: 0.1em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-tight { letter-spacing: -0.025em; }
.leading-snug { line-height: 1.375; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }
.text-balance { text-wrap: balance; }
.text-pretty { text-wrap: pretty; }
.whitespace-pre-line { white-space: pre-line; }
.text-center { text-align: center; }

/* Text colors */
.text-foreground { color: var(--foreground); }
.text-foreground\/90 { color: rgba(23, 29, 25, 0.9); }
.text-primary { color: var(--primary); }
.text-primary-foreground { color: var(--primary-foreground); }
.text-primary-foreground\/80 { color: rgba(243, 244, 241, 0.8); }
.text-muted-foreground { color: var(--muted-foreground); }
.text-accent { color: var(--accent); }
.text-accent-foreground { color: var(--accent-foreground); }
.text-destructive { color: var(--destructive); }
.text-border { color: var(--border); }
.text-background { color: var(--background); }
.text-background\/80 { color: rgba(243, 244, 241, 0.8); }
.text-background\/85 { color: rgba(243, 244, 241, 0.85); }
.text-card-foreground { color: var(--card-foreground); }

/* Background colors */
.bg-background { background-color: var(--background); }
.bg-background\/80 { background-color: rgba(243, 244, 241, 0.8); }
.bg-background\/95 { background-color: rgba(243, 244, 241, 0.95); }
.bg-primary { background-color: var(--primary); }
.bg-primary\/5 { background-color: rgba(30, 66, 49, 0.05); }
.bg-primary\/30 { background-color: rgba(30, 66, 49, 0.3); }
.bg-card { background-color: var(--card); }
.bg-muted { background-color: var(--muted); }
.bg-secondary { background-color: var(--secondary); }
.bg-secondary\/40 { background-color: rgba(228, 231, 226, 0.4); }
.bg-accent { background-color: var(--accent); }
.bg-destructive\/10 { background-color: rgba(180, 35, 24, 0.1); }
.bg-foreground\/55 { background-color: rgba(23, 29, 25, 0.55); }
.bg-muted-foreground\/50 { background-color: rgba(88, 97, 91, 0.5); }

/* Borders */
.border { border: 1px solid var(--border); }
.border-2 { border-width: 2px; }
.border-t { border-top: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }
.border-l-2 { border-left: 2px solid var(--border); }
.border-l-4 { border-left: 4px solid; }
.border-border { border-color: var(--border); }
.border-primary { border-color: var(--primary); }
.border-primary\/30 { border-color: rgba(30, 66, 49, 0.3); }
.border-l-primary { border-left-color: var(--primary); }
.border-l-accent { border-left-color: var(--accent); }
.border-destructive\/40 { border-color: rgba(180, 35, 24, 0.4); }
.border-dashed { border-style: dashed; }

.rounded-md { border-radius: var(--radius); }
.rounded-sm { border-radius: calc(var(--radius) * 0.6); }

/* Spacing - padding */
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }
.pt-8 { padding-top: 2rem; }
.pt-16 { padding-top: 4rem; }
.pl-4 { padding-left: 1rem; }
.pl-5 { padding-left: 1.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-24 { margin-top: 6rem; }
.mt-auto { margin-top: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Gap */
.gap-0\.5 { gap: 0.125rem; }
.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-10 { gap: 2.5rem; }
.gap-x-2 { column-gap: 0.5rem; }
.gap-y-1 { row-gap: 0.25rem; }
.gap-px { gap: 1px; }

/* Flexbox */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-baseline { align-items: baseline; }
.items-end { align-items: flex-end; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1 1 0%; }
.shrink-0 { flex-shrink: 0; }
.self-start { align-self: flex-start; }

/* Grid */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.col-span-2 { grid-column: span 2 / span 2; }

/* Positioning */
.relative { position: relative; }
.absolute { position: absolute; }
.isolate { isolation: isolate; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.-z-10 { z-index: -10; }
.top-0 { top: 0; }
.top-1\/2 { top: 50%; }
.top-2 { top: 0.5rem; }
.top-3 { top: 0.75rem; }
.bottom-0 { bottom: 0; }
.bottom-1\/2 { bottom: 50%; }
.right-2 { right: 0.5rem; }
.left-0 { left: 0; }
.left-3 { left: 0.75rem; }

/* Sizing */
.w-full { width: 100%; }
.w-px { width: 1px; }
.w-1 { width: 0.25rem; }
.w-4 { width: 1rem; }
.w-6 { width: 1.5rem; }
.w-40 { width: 10rem; }
.h-px { height: 1px; }
.h-3 { height: 0.75rem; }
.h-6 { height: 1.5rem; }
.h-full { height: 100%; }
.max-w-sm { max-width: 24rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-lg { max-width: 32rem; }
.max-w-6xl { max-width: 72rem; }
.min-w-max { min-width: max-content; }
.aspect-\[4\/3\] { aspect-ratio: 4 / 3; }

/* Display */
.hidden { display: none; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.cursor-pointer { cursor: pointer; }
.float-left { float: left; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Opacity */
.opacity-70 { opacity: 0.7; }
.opacity-80 { opacity: 0.8; }

/* Effects */
.object-cover { object-fit: cover; }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }

/* Transitions */
.transition-opacity { transition: opacity 150ms cubic-bezier(0.4, 0, 0.2, 1); }
.transition-shadow { transition: box-shadow 150ms cubic-bezier(0.4, 0, 0.2, 1); }
.transition-transform { transition: transform 500ms cubic-bezier(0.4, 0, 0.2, 1); }
.duration-500 { transition-duration: 500ms; }

/* Hover states */
.hover\:opacity-90:hover { opacity: 0.9; }
.hover\:shadow-lg:hover { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.hover\:text-primary:hover { color: var(--primary); }
.hover\:underline:hover { text-decoration: underline; }
.group:hover .group-hover\:scale-105 { transform: scale(1.05); }

/* Focus states — Tailwind ring implemented as box-shadow */
.focus\:outline-none:focus { outline: none; }
.focus\:ring-2:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--ring);
}
.focus-visible\:outline-none:focus-visible { outline: none; }
.focus-visible\:ring-2:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--ring);
}

/* Disabled */
.disabled\:opacity-50:disabled, button:disabled { opacity: 0.5; cursor: not-allowed; }

/* Lists */
.list-disc { list-style-type: disc; }
ul.list-none, main ul { list-style: none; }
ul { margin: 0; padding: 0; }
ul.list-disc { padding-left: 1.25rem; }

/* Links */
a { color: inherit; text-decoration: none; }
.underline-offset-4 { text-underline-offset: 4px; }

/* Fieldset / legend */
fieldset {
  border: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}
fieldset.border-t {
  border-top: 1px solid var(--border);
}
legend {
  padding: 0;
}

/* Forms — base input styling matching inputClass (h-10/11 rounded-md border-input bg-card) */
input, select, textarea {
  font-family: inherit;
  width: 100%;
  height: 2.5rem;
  border: 1px solid var(--input);
  border-radius: var(--radius);
  padding: 0 0.75rem;
  font-size: 0.875rem;
  color: var(--foreground);
  background-color: var(--card);
}
textarea {
  height: auto;
  padding: 0.5rem 0.75rem;
  line-height: 1.625;
}
input[type="checkbox"], input[type="radio"] {
  width: 1rem;
  height: 1rem;
  padding: 0;
  accent-color: var(--primary);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--ring);
}
input::placeholder, textarea::placeholder {
  color: var(--muted-foreground);
}
input.uppercase { text-transform: uppercase; }

/* Auth split card — image panel beside the form (login/register) */
.auth-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--card);
}
.auth-card-media {
  position: relative;
  min-height: 12rem;
}
.auth-card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.register-card-media {
  min-height: 22rem;
}
.register-hero-image {
  object-position: center 30%;
}
.auth-card-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.5rem;
}

/* Honeypot — present in the DOM for bots, invisible to humans */
.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Taller inputs used in listing/inquiry forms */
input#title, input#breed, input#color, select#sex, select#discipline,
input#age, input#height, input#registeredName, input#registry,
input#registrationNumber, input#sire, input#sireSire, input#sireDam,
input#dam, input#damSire, input#damDam, input#price, input#city,
input#state, input#customImage, input#sellerName, input#sellerEmail,
input#sellerPhone, input#inq-name, input#inq-email,
input#login-email, input#login-password,
input#register-email, input#register-password, input#register-confirm {
  height: 2.75rem;
}

/* Buttons */
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
  text-align: left;
}

/* Images */
img { max-width: 100%; display: block; }
img.h-full, img.w-full { max-width: none; }

/* peer / has-checked patterns for the stock photo picker */
.peer:checked ~ .peer-checked\:block { display: block; }
label:has(:checked).has-\[\:checked\]\:border-primary,
.has-\[\:checked\]\:border-primary:has(:checked) { border-color: var(--primary); }

/* HTMX indicator */
.htmx-indicator {
  opacity: 0;
  transition: opacity 150ms ease;
}
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  opacity: 1;
}

/* Responsive breakpoints */
@media (min-width: 640px) {
  .sm\:inline { display: inline; }
  .sm\:hidden { display: none; }
  .sm\:flex { display: flex; }
  .sm\:w-44 { width: 11rem; }
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .md\:hidden { display: none; }
  .md\:flex { display: flex; }
  .auth-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .register-card-media { min-height: 100%; }
  .auth-card-body { padding: 2.5rem; }
  .md\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
  .md\:py-16 { padding-top: 4rem; padding-bottom: 4rem; }
  .md\:py-32 { padding-top: 8rem; padding-bottom: 8rem; }
  .md\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
  .md\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .md\:text-6xl { font-size: 3.75rem; line-height: 1; }
  .md\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }
  .md\:flex-row { flex-direction: row; }
  .md\:items-end { align-items: flex-end; }
  .md\:justify-between { justify-content: space-between; }
  .md\:gap-6 { gap: 1.5rem; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .lg\:hidden { display: none; }
  .lg\:flex { display: flex; }
  .lg\:inline { display: inline; }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:col-span-2 { grid-column: span 2 / span 2; }
  .lg\:sticky { position: sticky; }
  .lg\:top-6 { top: 1.5rem; }
  .lg\:self-start { align-self: flex-start; }
}
