/*
 * 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.
 */
.tooltip-wide .tooltip-inner {
  max-width: 300px;
}

/* Statement page tabs: real tab buttons, with a clearly marked active one. */
.statement-tabs {
  border-bottom: 3px solid #0d6efd;
}
.statement-tabs .nav-link {
  background-color: #e9ecef;
  border: 1px solid #ced4da;
  border-bottom: none;
  color: #212529;
  margin-right: 0.25rem;
}
.statement-tabs .nav-link:hover {
  background-color: #dee2e6;
}
.statement-tabs .nav-link.active {
  background-color: #0d6efd;
  border-color: #0d6efd;
  color: #fff;
  font-weight: 700;
}
.statement-tabs .nav-link.active .badge {
  background-color: #fff !important;
  color: #0d6efd;
}

/* Flash messages stay in view while the page scrolls, so "Expense saved from line 14"
   is still visible after the redirect scrolls the statement to the line you left. */
.flash-stack {
  position: sticky;
  top: 0;
  z-index: 990; /* above table content, but below Bootstrap's dropdown menus (1000) */
}

/* The row StatementsController#show marks after a redirect (see mark_resume_row).
   scroll-margin-top leaves room for the sticky flash above it. */
tr#resume {
  scroll-margin-top: 6rem;
}

/* Fades a yellow highlight out so the eye finds the landing row. The animation goes on the
   cells because the striped table paints its own cell backgrounds over the row's. */
tr.resume-highlight > td {
  animation: resume-highlight 10s linear;
}

@keyframes resume-highlight {
  from { background-color: #fff3cd; }
  to   { background-color: transparent; }
}
