/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *
 *= require_tree .
 *= require_self
 */

.athlete-link .athlete-hovercard {
  display: none;
}

.athlete-link:hover .athlete-hovercard {
  position: absolute;
  display: inline-block;
}

a.athlete-link {
  color: rgb(34 197 94);
  text-decoration-line: underline;
}

a.club-link {
  color: rgb(70, 70, 70);
  text-decoration-line: underline;
}

/* Hotwire Combobox Customization */
.hw-combobox {
  width: 100%;
}

.hw-combobox__main-wrapper {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background-color: white;
}

.hw-combobox__input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: none;
  outline: none;
  background: transparent;
}

.hw-combobox__input:focus {
  outline: none;
  box-shadow: none;
}

.hw-combobox__main-wrapper:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.hw-combobox__listbox {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  background-color: white;
  max-height: 200px;
  overflow-y: auto;
  z-index: 50;
}

.hw-combobox__option {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
}

.hw-combobox__option:hover,
.hw-combobox__option--selected {
  background-color: #eff6ff;
}

.hw-combobox__option[aria-selected="true"] {
  background-color: #3b82f6;
  color: white;
}

/* Multiselect chips */
.hw-combobox__chip {
  background-color: #eff6ff;
  color: #1e40af;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  margin-right: 0.25rem;
}

/* Normalize multiselect height to match single select */
.hw-combobox--multiple .hw-combobox__input {
  line-height: 1.5rem !important;
}

/* Also fix the wrapper class name (gem uses double underscore) */
.hw-combobox__main__wrapper {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background-color: white;
}

.hw-combobox__main__wrapper:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

/* Utility to hide scrollbar while allowing scroll */
.scrollbar-hide {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;  /* Chrome, Safari and Opera */
}

/* Tailwind Override */
.trix-editor {
  width: 100%;
}

.trix-editor h1 {
  font-size: 1.25rem !important;
  line-height: 1.25rem !important;
  margin-bottom: 1rem;
  font-weight: 600;
}

.trix-editor a:not(.no-underline) {
  text-decoration: underline;
}

.trix-editor a:visited {
  color: green;
}

.trix-editor ul {
  list-style-type: disc;
  padding-left: 1rem;
}

.trix-editor ol {
  list-style-type: decimal;
  padding-left: 1rem;
}

.trix-editor pre {
  display: inline-block;
  width: 100%;
  vertical-align: top;
  font-family: monospace;
  font-size: 1.5em;
  padding: 0.5em;
  white-space: pre;
  background-color: #eee;
  overflow-x: auto;
}

.trix-editor blockquote {
  border: 0 solid #ccc;
  border-left-width: 0px;
  border-left-width: 0.3em;
  margin-left: 0.3em;
  padding-left: 0.6em;
}

/* Flash notification animations */
@keyframes slide-in-right {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slide-out-right {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

.animate-slide-in-right {
  animation: slide-in-right 0.3s ease-out forwards;
}

.animate-slide-out-right {
  animation: slide-out-right 0.3s ease-out forwards;
}

/* Print styles */
@media print {
  /* Hide navigation and UI chrome */
  nav,
  footer,
  #flash_messages,
  .mobile-navigation,
  .desktop-navigation,
  [data-controller="mobile-menu"],
  [data-controller="dropdown"] {
    display: none !important;
  }

  /* Remove all padding and margins */
  main {
    padding: 0 !important;
    margin: 0 !important;
    background: white !important;
  }

  .p-4,
  .p-6,
  .lg\:p-6 {
    padding: 0.5rem !important;
  }

  footer {
    display: none !important;
  }

  /* Hide grouped view sidebar */
  .print\:hidden {
    display: none !important;
  }

  /* Full width for print content */
  .print\:w-full {
    width: 100% !important;
  }

  /* Show columns hidden on smaller screens */
  .print\:table-cell {
    display: table-cell !important;
  }

  /* Remove decorative styling */
  .rounded-xl,
  .rounded-lg {
    border-radius: 0 !important;
  }

  .shadow-sm,
  .shadow {
    box-shadow: none !important;
  }

  .ring-1 {
    box-shadow: none !important;
  }

  /* Remove borders */
  .border,
  .border-slate-200 {
    border: none !important;
  }

  /* Ensure tables print well */
  table {
    width: 100% !important;
    font-size: 10pt !important;
  }

  th, td {
    padding: 2px 4px !important;
  }

  /* Page break handling */
  tr {
    page-break-inside: avoid;
  }

  thead {
    display: table-header-group;
  }

  /* Set white background */
  body,
  .bg-gray-100,
  .bg-slate-50,
  .bg-white {
    background: white !important;
  }

  /* Compact header section */
  .mb-4 {
    margin-bottom: 0.5rem !important;
  }

  /* Remove gap spacing */
  .gap-2,
  .gap-3 {
    gap: 0.25rem !important;
  }
}
