html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.app-brand-text {
  letter-spacing: 0;
}

.card {
  border-radius: 0.5rem;
}

.border-left-primary {
  border-left: 0.25rem solid var(--bs-primary) !important;
}

.border-left-success {
  border-left: 0.25rem solid var(--bs-success) !important;
}

.border-left-info {
  border-left: 0.25rem solid var(--bs-info) !important;
}

.border-left-warning {
  border-left: 0.25rem solid var(--bs-warning) !important;
}

.text-gray-800 {
  color: var(--bs-heading-color) !important;
}

.text-gray-500 {
  color: var(--bs-secondary-color) !important;
}

.text-gray-400,
.text-gray-300 {
  color: var(--bs-secondary-color) !important;
  opacity: 0.72;
}

.text-xs {
  font-size: 0.75rem;
}

.font-weight-bold {
  font-weight: 700 !important;
}

.progress-sm {
  height: 0.5rem;
}

.chart-area,
.chart-pie {
  min-height: 18rem;
}

.table > :not(caption) > * > * {
  vertical-align: middle;
}

.table th,
.table thead th,
.text-uppercase {
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.bootstrap-select:not(.bs-container) {
  width: 100% !important;
}

.bootstrap-select.bs-container {
  width: auto !important;
  z-index: 1095;
}

.bootstrap-select > .dropdown-toggle {
  min-height: calc(1.5em + 0.938rem + 2px);
  border-color: var(--bs-border-color);
  background-color: var(--bs-paper-bg);
  color: var(--bs-body-color);
  text-align: left;
}

.bootstrap-select > .dropdown-toggle:focus,
.bootstrap-select > .dropdown-toggle.show {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.15rem rgba(var(--bs-primary-rgb), 0.16);
}

.bootstrap-select .dropdown-menu {
  border-radius: 0.5rem;
}

.bootstrap-select.bs-container .dropdown-menu {
  max-width: min(24rem, calc(100vw - 2rem));
  min-width: 12rem;
  width: auto !important;
}

.bootstrap-select .dropdown-item {
  display: flex;
  align-items: center;
}

.badge-notifications {
  position: absolute;
  top: 0.35rem;
  right: 0.1rem;
  min-width: 1.125rem;
  height: 1.125rem;
  padding: 0.15rem 0.35rem;
  font-size: 0.6875rem;
}

.dropdown-notifications .dropdown-menu {
  min-width: 24rem;
  overflow: hidden;
}

.dropdown-notifications-list {
  max-height: 30rem;
  overflow-y: auto;
}

#notification-list {
  max-height: none;
  overflow: visible;
}

.dropdown-notifications-item {
  padding: 0.875rem 1rem;
}

.dropdown-notifications-item h6,
.dropdown-notifications-item small {
  line-height: 1.35;
}

.dropdown-notifications-actions {
  display: flex;
  align-items: flex-start;
  padding-top: 0.35rem;
  min-width: 0.75rem;
}

.dropdown-notifications-actions .badge-dot {
  width: 0.5rem;
  height: 0.5rem;
}

.dropdown-notifications-item.marked-as-read .dropdown-notifications-actions .badge-dot {
  opacity: 0;
}

.scoreboard-expand-card,
.dashboard-league-card {
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.scoreboard-expand-card.is-expanded,
.dashboard-league-card.is-expanded {
  position: fixed;
  inset: 1rem;
  z-index: 1090;
  display: flex;
  flex-direction: column;
  min-height: 0;
  box-shadow: 0 1rem 3rem rgba(46, 38, 61, 0.28);
}

.scoreboard-expand-card.is-expanded .table-responsive,
.dashboard-league-card.is-expanded .table-responsive {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}

.scoreboard-expand-card.is-expanded .scoreboard-expand-table,
.dashboard-league-card.is-expanded .dashboard-league-table {
  min-width: 1200px;
}

.dashboard-league-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1085;
  display: none;
  background: rgba(30, 30, 45, 0.5);
  backdrop-filter: blur(2px);
}

.dashboard-league-backdrop.show {
  display: block;
}

.dashboard-league-row,
.scoreboard-animated-row {
  backface-visibility: hidden;
  transform-origin: 0 0;
  will-change: transform;
}

.dashboard-league-row.league-row-moved-up,
.scoreboard-animated-row.scoreboard-row-moved-up {
  animation: scoreboardMoveUpPulse 1.1s ease;
}

.dashboard-league-row.league-row-moved-down,
.scoreboard-animated-row.scoreboard-row-moved-down {
  animation: scoreboardMoveDownPulse 1.1s ease;
}

.scoreboard-animated-row.scoreboard-row-value-changed {
  animation: scoreboardValuePulse 1.1s ease;
}

.league-rank-delta,
.scoreboard-rank-delta {
  margin-left: .35rem;
  font-size: .75rem;
  font-weight: 600;
}

.league-rank-delta.is-up,
.scoreboard-rank-delta.is-up {
  color: var(--bs-success);
}

.league-rank-delta.is-down,
.scoreboard-rank-delta.is-down {
  color: var(--bs-danger);
}

@keyframes scoreboardMoveUpPulse {
  0%, 100% { background-color: transparent; }
  35% { background-color: rgba(var(--bs-success-rgb), .13); }
}

@keyframes scoreboardMoveDownPulse {
  0%, 100% { background-color: transparent; }
  35% { background-color: rgba(var(--bs-danger-rgb), .10); }
}

@keyframes scoreboardValuePulse {
  0%, 100% { background-color: transparent; }
  35% { background-color: rgba(var(--bs-primary-rgb), .10); }
}

.timeline-collapsible-card .timeline-toggle-icon {
  transition: transform 0.2s ease;
}

.timeline-collapsible-card.is-expanded .timeline-toggle-icon {
  transform: rotate(180deg);
}

.timeline-collapsible-card.is-collapsed .timeline-extra-item {
  display: none;
}

.timeline-collapsible-card .card-header {
  border-bottom: 1px solid var(--bs-border-color);
}

.timeline-collapsible-card .card-body {
  margin-top: 1.25rem;
}

body.dashboard-league-expanded,
body.scoreboard-expanded {
  overflow: hidden;
}

@media (max-width: 575.98px) {
  .dropdown-notifications .dropdown-menu {
    min-width: calc(100vw - 2rem);
    max-width: calc(100vw - 2rem);
  }
}

@media (max-width: 767.98px) {
  .scoreboard-expand-card.is-expanded,
  .dashboard-league-card.is-expanded {
    inset: 0.5rem;
  }
}
