/* RSK.Tav - public styles. Plain CSS; tokens live in base.css. */

/* ==========================================================================
   Search page (Home/Index, _SearchResultRow)
   ========================================================================== */

.search-page {
  padding: 0.5rem 0;
}

/* Stack the search form and the results with a 1rem gap. A sibling margin (rather than
   flex gap) lets it collapse with the form box's own bottom margin, as it always did. */
.search-page > * + *,
.search-results-section > * + * {
  margin-top: 1rem;
}

.search-results-header {
  display: flex;
  margin-top: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e5e5;
  color: #808080;
  font-size: calc(0.875rem * var(--text-scale));
  line-height: 1.25rem;
  font-weight: 700;
  user-select: none;
}

/* "No results" notice */
.search-no-results {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid #fde68a;
  border-radius: 0.5rem;
  background: #fffbeb;
  color: var(--amber-800);
}

.search-no-results-icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* Name column of a result row; the explanation expands underneath it */
.search-row-body {
  display: flex;
  flex-grow: 1;
  flex-direction: column;
  justify-content: flex-start;
}

.search-row-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
}

/* Expander button. Its hover colour follows the row's level (heading vs line under it),
   which _SearchResultRow receives as a modifier. */
.search-row-chevron {
  margin-left: 0.5rem;
  padding: 0.125rem;
  color: #a9a9a9;
}

.search-row-chevron.is-parent-level:hover {
  color: #1b1c89;
}

.search-row-chevron.is-child-level:hover {
  color: #cc4c25;
}

.search-row-chevron-icon {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  transition: transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.search-row-chevron-icon.is-expanded {
  transform: rotate(90deg);
}

.search-row-description {
  padding-left: 1.5rem;
  margin-top: 0.375rem;
  color: var(--gray-500);
  font-size: calc(0.75rem * var(--text-scale));
  line-height: 1rem;
}

/* ==========================================================================
   Tariff code detail page (Home/Detailed, _TariffDetailCard)
   ========================================================================== */

.tariff-detail-page {
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
  padding: 1.5rem 0;
}

.tariff-detail-page > * + * {
  margin-top: 1rem;
}

.tariff-detail-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  user-select: none;
}

.tariff-detail-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Tariff code title when the card stands alone: the heading text after the code */
.tariff-detail-title-name {
  margin-left: 0.5rem;
  color: var(--gray-700);
  font-weight: 400;
}

/* ==========================================================================
   Chapter tree: loading indicator, row name
   ========================================================================== */

.tree-loading {
  padding: 0.75rem 0;
  text-align: center;
}

.tree-loading-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--primary-600);
}

.tree-loading-text {
  margin: 0.5rem 0 0;
  color: var(--gray-600);
  font-size: calc(0.875rem * var(--text-scale));
  line-height: 1.25rem;
}

.tariff-row-name.is-bold,
.tariff-under-strong {
  font-weight: 700;
}

/* ==========================================================================
   "No version in progress" warning (_NoVersionWarning)
   ========================================================================== */

.no-version-warning {
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  padding: 2rem;
  border: 2px solid var(--red-300);
  border-radius: 0.75rem;
  background: var(--red-50);
  text-align: center;
}

.no-version-warning-icon-row {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.no-version-warning-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 9999px;
  background: var(--red-100);
}

.no-version-warning-glyph {
  width: 2rem;
  height: 2rem;
  color: var(--red-600);
}

.no-version-warning-title {
  margin-bottom: 0.75rem;
  color: #7f1d1d;
  font-size: calc(1.5rem * var(--text-scale));
  line-height: 2rem;
  font-weight: 700;
}

.no-version-warning-text {
  margin-bottom: 1.5rem;
  color: var(--red-800);
}

.no-version-warning-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}
