/* ossuary/css/style.css */

.config-table th,
.config-table td {
  text-align: center;
  vertical-align: middle;
  padding: 0.45rem 0.6rem;
  font-size: 1rem;
  line-height: 1.2;
}

.page-title {
  padding: 0;
}

.card {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  margin-bottom: 1.25rem;
  padding: 1rem 0;
}

.card.mb-3 {
  margin-bottom: 1.25rem;
}

.config-table input[type="number"] {
  background-color: #4f545c;
  border: none;
  color: var(--text-primary);
  text-align: center;
  padding: 0.2rem 0.35rem;
  border-radius: 4px;
  width: 100%;
  margin-bottom: 0;
}

.config-header-label {
  display: inline-block;
  max-width: 100%;
}

.table-scroll-shell {
  width: 100%;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) rgba(255, 255, 255, 0.06);
}

.table-scroll-shell::-webkit-scrollbar {
  height: 10px;
}

.table-scroll-shell::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 999px;
}

.table-scroll-shell::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.table-scroll-shell::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.32);
  background-clip: padding-box;
}

.config-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.config-table-panel {
  display: flex;
  flex-direction: column;
}

.config-sidebar {
  display: flex;
  flex-direction: column;
  align-self: start;
}

#dropRatesTableConfig {
  width: 100%;
  table-layout: auto;
}

#dropRatesTableConfig td:first-child {
  text-align: left;
}

#dropRatesTableConfig td:last-child {
  white-space: nowrap;
}

#dropRatesTableConfig td:last-child input[type="number"] {
  width: calc(100% - 1.25rem);
  display: inline-block;
  vertical-align: middle;
}

.config-table-wrap {
  margin-bottom: 0.35rem;
}

.config-rate-error {
  margin-top: 0.35rem;
  margin-bottom: 0;
}

.config-total-rate {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.config-controls-table {
  margin-bottom: 0.75rem;
  table-layout: auto;
  width: 100%;
}

.config-controls-table td {
  padding: 0.45rem 0.55rem;
}

.config-controls-table td:first-child {
  text-align: left;
  white-space: nowrap;
  width: 42%;
}

.config-controls-table td:last-child {
  width: 58%;
}

.config-controls-table label {
  margin-bottom: 0;
}

.config-controls-table input[type="number"] {
  margin-bottom: 0;
}

.config-button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.config-button-group {
  display: flex;
  flex-direction: column;
  justify-content: end;
}

.config-button-group button {
  width: 100%;
  height: 38px;
  padding-top: 0;
  padding-bottom: 0;
}

.secondary-button {
  background-color: #72767d;
}

.secondary-button:hover {
  background-color: #5f646b;
}

@media (min-width: 768px) {
  .config-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }
}

.results-table th,
.results-table td {
  padding: 0.65rem 0.75rem;
}

.results-table {
  width: 100%;
  table-layout: auto;
}

.results-table td:first-child {
  font-weight: 500;
}

.result-summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.summary-card {
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 0.9rem 1rem;
}

.summary-label {
  color: var(--text-secondary);
  font-size: 0.92rem;
  margin-bottom: 0.25rem;
}

.summary-value {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
}

.chart-caption {
  text-align: center;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.4;
}

.card-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.card-heading-row h2 {
  margin-bottom: 0;
}

.chart-toggle {
  margin-bottom: 0;
  flex-shrink: 0;
}

.chart-toggle label {
  margin-bottom: 0;
}

.journey-chart-container {
  margin-bottom: 1rem;
}

.percentile-grid {
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .result-summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .percentile-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.results-footnote {
  margin-top: 1rem;
}

body.content-compact {
  --mobile-section-gutter: 0.85rem;
}

body.content-compact .table-scroll-shell {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

body.content-compact .config-table,
body.content-compact .results-table {
  width: max-content;
  min-width: 100%;
}

body.content-compact .config-table th,
body.content-compact .results-table th {
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
}

body.content-compact .config-table td,
body.content-compact .results-table td {
  white-space: nowrap;
}

body.content-compact .config-controls-table td:first-child,
body.content-compact .config-controls-table td:last-child {
  width: auto;
}

body.content-compact .result-summary-grid {
  gap: 0.6rem;
}

body.content-compact .summary-card {
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  background-color: rgba(255, 255, 255, 0.03);
}

@media (max-width: 767px) {
  .page-title {
    padding: 0 var(--mobile-section-gutter, 1rem);
  }

  .card {
    padding: 1.25rem var(--mobile-section-gutter, 1rem);
    margin-bottom: 1rem;
  }

  .table-scroll-shell {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .config-table,
  .results-table {
    width: max-content;
    min-width: 100%;
  }

  .config-table th,
  .results-table th {
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
  }

  .config-table td,
  .results-table td {
    white-space: nowrap;
  }

  .config-controls-table td:first-child {
    width: auto;
  }

  .config-controls-table td:last-child {
    width: auto;
  }

  .result-summary-grid {
    gap: 0.6rem;
  }

  .summary-card {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    background-color: rgba(255, 255, 255, 0.03);
  }
}
