/**
 * Component Styles
 * 
 * Reusable UI components: cards, buttons, tables, etc.
 */

/* Feature Cards */
.feature {
  background-color: var(--bg-card);
  margin: 12px 0;
  padding: 20px 24px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.feature:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature p {
  color: var(--text-secondary);
  margin: 8px 0;
}

.feature h3 a {
  color: var(--primary-color);
  font-size: 1.125rem;
}

.feature-image {
  float: left;
  width: 180px;
  margin-right: 20px;
  border-radius: var(--radius-sm);
}

.feature-container .feature:first-child {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  margin-top: 24px;
}

.feature-container .feature:last-child {
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  margin-bottom: 24px;
}

.feature-container .feature:only-child {
  border-radius: var(--radius-lg);
}

/* Striped Tables */
.stripe {
  border-collapse: collapse;
  width: 100%;
  margin-top: 16px;
  margin-bottom: 16px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.stripe tbody tr:nth-child(even) {
  background: var(--bg-light);
}

.stripe tbody tr:nth-child(odd) {
  background: var(--bg-card);
}

.stripe td, .stripe th {
  padding: 12px 16px;
  text-align: left;
}

/* Search Button */
#zoom-control {
  flex-shrink: 0;
}

#zoom-control .ulhoriz {
  margin: 0;
  padding: 0;
  list-style: none;
}

#zoom-control li {
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-medium) 100%);
  width: 56px;
  height: 56px;
  display: inline-block;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid var(--bg-medium);
  border-left: none;
}

#zoom-control li:hover,
#zoom-control li:focus-within {
  background: linear-gradient(135deg, var(--accent-color) 0%, #ea580c 100%);
  border-color: var(--accent-color);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

#zoom-control li:active {
  transform: scale(0.98);
}

/* The search button fills its square and takes its look from the li */
#zoom-control button {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

#zoom-control li img {
  height: 100%;
  width: 100%;
  display: block;
  transition: var(--transition);
}

#zoom-control li:hover img,
#zoom-control li:focus-within img {
  filter: brightness(1.2);
}

/* Recording Player */
#ab-player {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-dark);
  box-shadow: var(--shadow-lg);
}

#ab-player-title {
  flex: 1 1 200px;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-light);
}

#ab-player-audio {
  flex: 0 1 auto;
  height: 36px;
}

#ab-player-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--bg-medium);
  color: var(--text-light);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
}

#ab-player-close:hover,
#ab-player-close:focus-visible {
  background: var(--accent-color);
}

/* Play buttons within tables */
.ab-play {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--primary-color);
  font-size: 0.7rem;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
}

.ab-play:hover,
.ab-play:focus-visible {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--text-light);
}

/* Header filters that suggest the values a field holds */
.ab-autocomplete {
  display: block;
}

.ab-autocomplete input {
  width: 100%;
  padding: 4px;
}
