/* Param calculator specific styles */

.results-table {
  width: 100%;
  border-collapse: collapse;
}

.results-table td {
  padding: 4px 6px;
}

.results-table td:last-child {
  text-align: right;
}

.az-results-table td:first-child {
  width: 44px;
  font-weight: 700;
}

.az-results-table td:nth-child(2) {
  text-align: left;
}

.row-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.row-line .left {
  flex: 2;
  text-align: left;
}

.row-line .right {
  flex: 3;
  text-align: right;
}

/* Second line uses a slightly narrower left column */
.row-line.narrow .left {
  flex: 1.5;
}

.row-line.narrow .right {
  flex: 3.5;
}

/* Helper for subtle inline explanations */
.muted {
  color: var(--muted-text-color);
  font-size: 0.9em;
}

.inline-note {
  display: inline-block;
  margin-left: 8px;
}

.computed-display {
  margin-top: 6px;
  color: var(--strong-text-color);
}

.computed-total {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface-muted);
  color: var(--strong-text-color);
  font-size: 18px;
  font-weight: 700;
}

.layer-count-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.layer-count-row .form-group {
  min-width: 0;
  margin-bottom: 0;
}

.layer-count-row input {
  width: 100%;
  box-sizing: border-box;
}

.collapsible-sections {
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface-muted);
  box-shadow: var(--shadow-soft);
  margin-bottom: 25px;
  overflow: hidden;
}

.collapsible-sections summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 700;
  color: var(--strong-text-color);
  user-select: none;
}

.collapsible-sections summary::-webkit-details-marker {
  display: none;
}

.collapsible-sections summary::before {
  content: '▸';
  flex: 0 0 auto;
  color: var(--accent-color);
  font-size: 15px;
  line-height: 1;
}

.collapsible-sections summary::after {
  content: 'Expand';
  flex: 0 0 auto;
  color: var(--muted-text-color);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.collapsible-sections[open] summary {
  background: var(--surface-strong);
  box-shadow: inset 0 -1px 0 var(--border-strong);
}

.collapsible-sections[open] summary::before {
  content: '▾';
}

.collapsible-sections[open] summary::after {
  content: 'Collapse';
}

.collapsible-sections summary:hover {
  background: var(--surface-strong);
}

.collapsible-sections summary:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.collapsible-sections > .fieldset {
  margin-bottom: 0;
}

.collapsible-sections[open] > .fieldset {
  border: 0;
  border-radius: 0;
  margin: 0;
  padding: 16px;
  background: var(--surface-soft);
}

.collapsible-sections[open] > .fieldset legend {
  display: none;
}

.static-section .form-row:last-child {
  margin-bottom: 0;
}

.stable-ref {
  display: none;
}
