html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

/* table-responsive must have position: relative for position: sticky to work on child th elements */
.table-responsive {
  position: relative !important;
}

/* Compare matrix sticky header - headers stay visible when scrolling */
.compare-matrix.sticky-header thead th {
    position: sticky;
    top: 0;
    vertical-align: bottom;
    background-color: #f8f9fa;
}

/* Ensure the table has a positioned container for sticky headers */
.compare-matrix.sticky-header {
    position: relative;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.accordion-button.accordion-complete {
  background-color: #d1e7dd;
  color: #0f5132;
}

.accordion-button.accordion-complete:not(.collapsed) {
  background-color: #d1e7dd;
  color: #0f5132;
}

.accordion-button.accordion-complete::after {
  background-image: var(--bs-accordion-btn-active-icon);
}

.tooltip-inner {
  max-width: 400px;
  white-space: pre-line;
  text-align: left;
}

.autocomplete-wrap {
  position: relative;
}

.autocomplete-suggestions {
  position: absolute;
  z-index: 1050;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid #ced4da;
  border-top: none;
  border-radius: 0 0 0.25rem 0.25rem;
  background: #fff;
}

.autocomplete-suggestions .list-group-item {
  cursor: pointer;
}

.autocomplete-suggestions .list-group-item.active {
  background-color: #0d6efd;
  border-color: #0d6efd;
  color: #fff;
}

/* Compare matrix styles */
.compare-matrix th.character-header {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    padding: 4px 2px;
    vertical-align: bottom;
}

.compare-matrix .rotated-header {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    white-space: nowrap;
    font-size: 0.75rem;
    line-height: 1.2;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Character name hover tooltip - large plain text below the rotated header */
.compare-matrix th.character-header::after {
    content: attr(data-name);
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #212529;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    padding: 0.5rem 0.9rem;
    border-radius: 0.375rem;
    z-index: 1100;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.compare-matrix th.character-header:hover::after {
    display: block;
}

/* Compare matrix sticky header - headers stay visible when scrolling */
.compare-matrix.sticky-header thead th {
    position: sticky;
    top: 0;
    vertical-align: bottom;
    background-color: #f8f9fa;
}

/* Compare matrix rotated headers need extra height when sticky */
.compare-matrix.sticky-header thead th.character-header {
    background-color: #f8f9fa;
    z-index: 11;
}

.compare-matrix.sticky-header thead th.achievement-header {
    background-color: #f8f9fa;
    z-index: 12;
    left: 0;
}

/* Regular table sticky headers - keeps column labels visible while scrolling */
.table.sticky-header thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #fff;
    box-shadow: inset 0 -1px 0 #dee2e6;
}

/* Keep sticky header above striped/hover row backgrounds */
.table.sticky-header thead tr:hover th {
    background-color: #fff;
}

/* Compare matrix compare-cell done state */
.compare-matrix td.compare-cell.done {
    background-color: #d1e7dd !important;
}

/* Navbar button hover effects - light blue to dark blue */
.navbar-nav .nav-link.btn-outline-primary:hover,
.navbar-nav .nav-link.btn-outline-secondary:hover {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Light blue background for outline buttons by default (visible against white) */
.navbar-nav .nav-link.btn-outline-primary,
.navbar-nav .nav-link.btn-outline-secondary {
    background-color: #cfe2f3;
    border-color: #cfe2f3;
    color: #0d6efd;
}

/* Keep text white on hover for outline buttons */
.navbar-nav .nav-link.btn-outline-primary:hover,
.navbar-nav .nav-link.btn-outline-secondary:hover {
    color: #fff;
}

/* User area - hello text and logout button */
.navbar-text.text-dark {
    vertical-align: middle;
    line-height: 1.5;
}

/* Add space between user area and login buttons */
.navbar-nav .nav-item.mx-2 {
    margin-right: 0.75rem;
}