/* Horses-specific styles */

/* Public horse directory layout */
.horse-directory { --horse-gap: 1.25rem; }
.horse-directory__heading { margin: 0 0 1.5rem; padding: .25rem 0 1rem; border-bottom: 1px solid var(--cl-border); }
.horse-directory__heading .eyebrow { margin-bottom: .15rem; color: var(--cl-walnut); }
.horse-directory__heading h1 { margin: 0; font-size: clamp(2.6rem, 6vw, 4rem); line-height: 1; }
.horse-directory__heading > p:last-child { margin: .45rem 0 0; color: var(--cl-muted); }
.horse-directory__layout { display: grid; grid-template-columns: minmax(250px, 310px) minmax(0, 1fr); gap: var(--horse-gap); align-items: start; }
.horse-directory__sidebar { display: grid; gap: var(--horse-gap); }
.horse-directory__panel { border-radius: 10px; }
.horse-directory__panel .minecraft-header { border-radius: 9px 9px 0 0; }
.horse-directory__search { display: grid; gap: 1rem; }
.horse-directory__search .minecraft-label { display: block; margin-bottom: .35rem; }
.horse-directory__search-actions { display: grid; gap: .55rem; margin-top: .15rem; }
.horse-directory__search-actions > * { width: 100%; text-align: center; }
.horse-directory__tips { padding: 1rem; }
.horse-directory__tips .header-section { margin: 0 0 .85rem; padding-bottom: .65rem; border-bottom: 1px solid var(--cl-border); font-size: 1.55rem; }
.horse-directory__tips ul { display: grid; gap: .8rem; margin: 0; padding: 0; list-style: none; }
.horse-directory__tips li { display: grid; gap: .05rem; padding-left: .8rem; border-left: 3px solid var(--cl-walnut); }
.horse-directory__tips li strong { color: var(--cl-dark-walnut); font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.08rem; }
.horse-directory__tips li span { color: var(--cl-muted); font-size: .9rem; line-height: 1.45; }
.horse-directory__listing { min-width: 0; padding: 1rem; }
.horse-directory__listing-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .85rem; padding: 0 .15rem .65rem; border-bottom: 1px solid var(--cl-border); }
.horse-directory__listing-heading .header-section { margin: 0; font-size: 1.8rem; }
.horse-directory__count { color: var(--cl-muted); font-size: .9rem; white-space: nowrap; }
.horse-directory__table-wrap { overflow: hidden; border: 1px solid var(--cl-border); border-radius: 8px; }
.horse-directory .minecraft-table { min-width: 920px; table-layout: fixed; }
.horse-directory .minecraft-table-header th { white-space: nowrap; }
.horse-directory .minecraft-table-cell { vertical-align: middle; }
.horse-directory .minecraft-table th:first-child,
.horse-directory .minecraft-table td:first-child { white-space: nowrap; overflow-wrap: normal; }
.horse-directory .minecraft-table th:nth-child(3),
.horse-directory .minecraft-table td:nth-child(3) { width: 10%; white-space: nowrap; }
.horse-directory .minecraft-table th:nth-child(1),
.horse-directory .minecraft-table td:nth-child(1) { width: 10%; }
.horse-directory .minecraft-table th:nth-child(2),
.horse-directory .minecraft-table td:nth-child(2) { width: 22%; }
.horse-directory .minecraft-table th:nth-child(4),
.horse-directory .minecraft-table td:nth-child(4) { width: 12%; }
.horse-directory .minecraft-table th:nth-child(5),
.horse-directory .minecraft-table td:nth-child(5) { width: 16%; }
.horse-directory .minecraft-table th:nth-child(6),
.horse-directory .minecraft-table td:nth-child(6) { width: 8%; }
.horse-directory .minecraft-table th:nth-child(7),
.horse-directory .minecraft-table td:nth-child(7) { width: 14%; }
.horse-directory .minecraft-table th:nth-child(8),
.horse-directory .minecraft-table td:nth-child(8) { width: 9%; }
.horse-directory .minecraft-table-cell:last-child { white-space: nowrap; }
.horse-directory .minecraft-button.minecraft-small { min-height: 36px; padding: .45rem .8rem; font-size: .9rem; }
.horse-status-badge { display: inline-flex; min-height: 1.8rem; align-items: center; gap: .35rem; padding: .25rem .6rem; border-radius: 999px; font-size: .82rem; font-weight: 600; line-height: 1; white-space: nowrap; }
.horse-status-badge--active { color: #39734e; background: #e4f1e7; }
.horse-status-badge--retired { color: #8b6420; background: #f6e9c9; }
.horse-status-badge--deceased { color: #915656; background: #f2e5e3; }
.horse-directory__pagination { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1rem; }
.horse-directory__pagination p { margin: 0; color: var(--cl-muted); font-size: .9rem; text-align: right; }
.horse-directory__pagination .pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; margin: 0; padding: 0; }
.horse-directory__pagination .pagination > span { display: inline-flex; }
.horse-directory__pagination .pagination a,
.horse-directory__pagination .pagination .page.current,
.horse-directory__pagination .pagination .gap { display: inline-flex; min-width: 2.5rem; min-height: 2.5rem; align-items: center; justify-content: center; padding: .4rem .65rem; border: 1px solid var(--cl-border); border-radius: 7px; color: var(--cl-dark-walnut); background: #fff; font-size: .9rem; line-height: 1; text-decoration: none; }
.horse-directory__pagination .pagination a:hover,
.horse-directory__pagination .pagination a:focus-visible { border-color: var(--cl-walnut); color: #fff; background: var(--cl-walnut); text-decoration: none; }
.horse-directory__pagination .pagination .page.current { border-color: var(--cl-walnut); color: #fff; background: var(--cl-walnut); font-weight: 700; }
.horse-directory__pagination .pagination .gap { min-width: auto; border-color: transparent; background: transparent; }
.horse-directory__empty-state { padding: 2rem 1rem; border: 1px dashed var(--cl-border); border-radius: 8px; color: var(--cl-muted); text-align: center; }

@media (max-width: 991.98px) {
  .horse-directory__layout { grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); }
  .horse-directory__pagination { flex-direction: column; align-items: stretch; }
  .horse-directory__pagination p { text-align: center; }
}

@media (max-width: 767.98px) {
  .horse-directory__layout { grid-template-columns: minmax(0, 1fr); }
  .horse-directory__sidebar { grid-template-columns: minmax(0, 1fr); }
  .horse-directory__listing { padding: .85rem; }
  .horse-directory__listing-heading { align-items: flex-start; flex-direction: column; gap: .15rem; }
}

/* Minecraft table styling */
.minecraft-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: 'Minecraft', 'Press Start 2P', monospace;
  color: #ffffff;
  border: 4px solid var(--minecraft-primary-darker);
  background-color: rgba(0, 0, 0, 0.3);
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, 0.1), 
              inset -2px -2px 0 rgba(0, 0, 0, 0.3);
}

/* Table header */
.minecraft-table-header {
  background-color: var(--minecraft-primary-darker);
  color: #ffffff;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.minecraft-table-header th {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 4px solid var(--minecraft-primary-darkest);
  border-right: 2px solid var(--minecraft-primary-darkest);
}

.minecraft-table-header th:last-child {
  border-right: none;
}

/* Table rows with zebra striping */
.minecraft-table-row:nth-child(odd) {
  background-color: rgba(32, 178, 170, 0.2); /* Light teal */
}

.minecraft-table-row:nth-child(even) {
  background-color: rgba(22, 122, 115, 0.3); /* Darker teal */
}

/* Table cells */
.minecraft-table-cell {
  padding: 10px 15px;
  border-bottom: 2px solid var(--minecraft-primary-darker);
  border-right: 2px solid var(--minecraft-primary-darker);
  font-size: 0.9rem;
  font-weight: 600;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.7);
}

.minecraft-table-cell:last-child {
  border-right: none;
}

/* Hover effect for rows */
.minecraft-table-row:hover {
  background-color: rgba(45, 212, 204, 0.3); /* Lighter teal highlight */
}

/* Small button variant for tables */
.minecraft-button.minecraft-small {
  padding: 5px 10px;
  font-size: 0.7rem;
  border-width: 3px;
}

/* Improved font readability for table content */
.minecraft-table-cell {
  font-family: 'Minecraft', 'Press Start 2P', monospace;
  letter-spacing: 1px;
  line-height: 1.5;
}

/* Horse lineage links styling */
.horse-lineage-link {
  color: #4fc3f7;
  text-decoration: none;
  font-weight: 600;
  position: relative;
  transition: all 0.3s ease;
  padding: 2px 5px;
  border-radius: 4px;
  background-color: rgba(0, 0, 0, 0.2);
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.5);
}

.horse-lineage-link:hover {
  color: #81d4fa;
  background-color: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 8px rgba(79, 195, 247, 0.6);
  transform: translateY(-2px);
  text-decoration: none;
}

.horse-lineage-link:active {
  transform: translateY(0);
  box-shadow: 0 0 4px rgba(79, 195, 247, 0.4);
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
  .minecraft-table-header th,
  .minecraft-table-cell {
    padding: 8px 10px;
    font-size: 0.8rem;
  }
  
  .minecraft-button.minecraft-small {
    padding: 4px 8px;
    font-size: 0.6rem;
  }
}

.breed-directory__images { text-align: center; }
.breed-directory__main-image { width: 100%; height: 220px; object-fit: cover; }
.breed-directory__thumbnail { width: 31%; height: 72px; object-fit: cover; }
.breed-directory__name, .breed-directory__name:visited { color: var(--cl-walnut); }
.breed-directory__name:hover, .breed-directory__name:focus-visible { color: var(--cl-dark-walnut); }

.breed-detail { padding-bottom: 2rem; }
.breed-detail__back { color: var(--cl-dark-walnut); font-weight: 700; text-decoration: none; }
.breed-detail__main-image { width: 100%; max-height: 520px; object-fit: contain; }
.breed-detail__additional-image { width: 100%; height: 150px; object-fit: cover; }
.breed-detail__facts { display: grid; gap: .75rem; margin: 1rem 0 0; }
.breed-detail__facts > div { display: grid; grid-template-columns: minmax(110px, .8fr) 1.2fr; gap: .75rem; padding-bottom: .65rem; border-bottom: 1px solid var(--cl-border); }
.breed-detail__facts dt, .breed-detail__facts dd { margin: 0; }
.breed-detail__facts dt { color: var(--cl-muted); }
.breed-detail__facts dd { font-weight: 700; }
