/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Pagy 9's pagy_nav renders <nav class="pagy nav">, NOT class="pagy-nav" —
   note the space, two separate classes. (The previous ".pagy-nav" selector
   here never matched anything; the pagination had no custom styling at
   all.) Page links and prev/next have no distinguishing class when
   enabled; the current page gets class="current", gaps get class="gap",
   and disabled prev/next carry aria-disabled="true" with no class. */
.pagy.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 1.5rem;
  font-size: 0.875rem;
}

.pagy.nav a {
  display: inline-flex;
  height: 2.25rem;
  min-width: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.375rem;
  padding: 0 0.625rem;
  border: 1px solid #d1d5db;
  background-color: #fff;
  color: #374151;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.pagy.nav a:hover:not([aria-disabled="true"]) {
  background-color: #f9fafb;
}

.pagy.nav a.current {
  background-color: #111827;
  border-color: #111827;
  color: #fff;
}

.pagy.nav a.gap {
  border-color: transparent;
  background: none;
  box-shadow: none;
  cursor: default;
}

.pagy.nav a[aria-disabled="true"] {
  color: #9ca3af;
  cursor: default;
  opacity: 0.6;
}

.dark .pagy.nav a {
  border-color: #4b5563;
  background-color: #1f2937;
  color: #d1d5db;
}

.dark .pagy.nav a:hover:not([aria-disabled="true"]) {
  background-color: #374151;
}

.dark .pagy.nav a.current {
  background-color: #f3f4f6;
  border-color: #f3f4f6;
  color: #111827;
}

.dark .pagy.nav a.gap {
  border-color: transparent;
  background: none;
}

.dark .pagy.nav a[aria-disabled="true"] {
  color: #6b7280;
}

/* Tom Select (club combobox) light-theme overrides to match the rest of the
   form controls, plus dark-mode rules since tom-select.css ships light-only. */
.ts-wrapper.single .ts-control,
.ts-control {
  border-radius: 0.375rem;
  border-color: #d1d5db;
}

.ts-wrapper.focus .ts-control {
  border-color: #111827;
  box-shadow: 0 0 0 1px #111827;
}

.dark .ts-control,
.dark .full .ts-control,
.dark .ts-wrapper.single.input-active .ts-control {
  background-color: #1f2937;
  border-color: #4b5563;
  color: #f3f4f6;
}

.dark .ts-control > input {
  color: #f3f4f6;
}

.dark .ts-wrapper.focus .ts-control {
  border-color: #f3f4f6;
  box-shadow: 0 0 0 1px #f3f4f6;
}

.dark .ts-wrapper.multi .ts-control > div {
  background: #374151;
  color: #f3f4f6;
  border-color: #4b5563;
}

.dark .ts-wrapper.multi .ts-control > div.active {
  background: #4b5563;
  color: #f3f4f6;
}

.dark .ts-dropdown {
  background: #1f2937;
  border-color: #4b5563;
  color: #f3f4f6;
}

.dark .ts-dropdown .optgroup-header {
  background: #1f2937;
  color: #f3f4f6;
}

.dark .ts-dropdown .active {
  background-color: #374151;
  color: #f3f4f6;
}

.dark .ts-dropdown .create {
  color: #9ca3af;
}
