/* Layout wrappers */
#buttonRow {
  margin-bottom: 8px;
}

#searchSection,
#filterSection {
  margin-bottom: 10px;
}

#alphabetNav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.az-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

.az-button:hover {
  border-color: var(--brand);
}

.search-wrapper input {
  width: 0;
  opacity: 0;
  transition: width 0.25s ease, opacity 0.25s ease;
}

.search-wrapper input.active {
  width: 100%;
  opacity: 1;
}

/* Filter and tag groups */
#categoryFilters,
#tagCheckboxes {
  display: grid;
  gap: 10px;
}

#categoryFilters fieldset,
#tagCheckboxes fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin: 0;
}

#categoryFilters legend,
#tagCheckboxes legend {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#categoryFilters label,
#tagCheckboxes label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 6px 8px 0 0;
  font-size: 0.9rem;
}

/* Add form */
.add-card {
  margin-top: 12px;
}

.add-card h2 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.add-card input,
.add-card textarea {
  margin-bottom: 8px;
}

/* Cocktail cards */
.cocktail-toggle {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  overflow: hidden;
}

.cocktail-header {
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.cocktail-header strong {
  font-size: 1rem;
}

.cocktail-header em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.82rem;
  text-align: right;
}

.cocktail-content {
  padding: 0 12px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.25s ease;
  border-top: 1px solid transparent;
}

.cocktail-content.expanded {
  padding: 12px;
  max-height: 1200px;
  border-top-color: #2e3c50;
}

.cocktail-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

@media (min-width: 760px) {
  .cocktail-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.cocktail-grid ul {
  margin: 8px 0 0;
  padding-left: 16px;
}

.cocktail-grid p {
  margin: 8px 0;
}

.cocktail-image {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #3a4a63;
}

.cocktail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid #2e3c50;
}

.edit-button,
.delete-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}

.edit-button {
  background: rgba(59, 130, 246, 0.2);
  color: #bfdbfe;
}

.delete-button {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
}

.fab {
  position: fixed;
  right: 14px;
  bottom: 14px;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(140deg, #f59e0b, #f97316);
  color: #201200;
  font-size: 1.7rem;
  font-weight: 700;
  box-shadow: var(--shadow);
  cursor: pointer;
}
