/* Calculator-specific styles only.
   Shared LabVision styles are loaded from /shared.
   Keep this file small. */

body {
  background: #ffffff;
}

.lv-calc-header p {
  max-width: 880px;
}

.lv-hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 14px auto 18px;
}

.lv-hero-divider-line {
  display: block;
  width: 52px;
  height: 2px;
  border-radius: 999px;
  background: var(--lv-blue);
  opacity: 0.25;
}

.lv-hero-divider-icon {
  display: block;
  width: 32px;
  height: 32px;
  color: var(--lv-blue);
  overflow: visible;
}

.lv-hero-divider-icon rect,
.lv-hero-divider-icon line {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  opacity: 0.58;
}

.lv-hero-divider-icon circle {
  fill: currentColor;
  opacity: 0.42;
}

.lv-segmented-control {
  display: inline-flex;
  max-width: 100%;
  padding: 4px;
  border-radius: 14px;
  background: #eef2f7;
  border: 1px solid var(--lv-border);
  gap: 4px;
}

.lv-segmented-option {
  min-height: 40px;
  padding: 9px 16px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--lv-muted);
  font-family: var(--lv-font);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.lv-segmented-option.lv-active {
  background: #ffffff;
  color: var(--lv-blue);
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.08);
}

.lv-hemo-section {
  margin-top: 18px;
}

.lv-hemo-section h3,
.lv-grid-count-card h4 {
  margin-top: 0;
  color: var(--lv-navy);
}

.lv-calculator-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.82fr) minmax(0, 1.35fr);
  gap: 22px;
  align-items: start;
}

.lv-setup-panel,
.lv-count-entry-panel,
.lv-optional-details {
  padding: 16px;
  border: 1px solid var(--lv-border);
  border-radius: 14px;
  background: #ffffff;
}

.lv-setup-panel h3,
.lv-count-entry-panel h3 {
  margin-bottom: 14px;
}

.lv-section-helper {
  margin: 0;
  color: var(--lv-muted);
  font-size: 14px;
  line-height: 1.65;
}

.lv-count-entry-panel .lv-section-helper {
  margin-bottom: 14px;
}

.lv-count-entry-kicker {
  margin-bottom: 6px;
  color: var(--lv-blue);
  font-size: 13px;
  font-weight: 800;
}

.lv-optional-details summary {
  color: var(--lv-navy);
  cursor: pointer;
  font-weight: 800;
}

.lv-optional-details .lv-grid {
  margin-top: 16px;
}

.lv-grid-count-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.lv-grid-count-card {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--lv-border);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.035);
}

.lv-grid-count-card h4 {
  margin-bottom: 10px;
  font-size: 15px;
}

.lv-grid-count-card .lv-field {
  margin-bottom: 0;
}

.lv-compact-grid {
  grid-template-columns: 1fr;
  gap: 14px;
}

.lv-count-input-control {
  display: grid;
  grid-template-columns: 38px minmax(78px, 1fr) 38px;
  align-items: stretch;
  min-width: 0;
  border: 1px solid #d4dae3;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.lv-count-input-control .lv-input {
  min-width: 0;
  height: 42px;
  border: 0;
  border-left: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
  border-radius: 0;
  background: #ffffff;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

.lv-count-input-control .lv-input::-webkit-outer-spin-button,
.lv-count-input-control .lv-input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.lv-count-input-control .lv-input[type="number"] {
  -moz-appearance: textfield;
}

.lv-count-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 42px;
  border: 0;
  padding: 0;
  background: #f8fafc;
  color: var(--lv-navy);
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  text-indent: 0;
  transform: none;
  overflow: visible;
  appearance: none;
  -webkit-appearance: none;
}

.lv-count-stepper span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  font: inherit;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  text-indent: 0;
  transform: none;
  pointer-events: none;
}

.lv-count-stepper::before,
.lv-count-stepper::after {
  content: none;
}

.lv-count-stepper span::before,
.lv-count-stepper span::after {
  content: none;
}

.lv-count-stepper:focus-visible,
.lv-count-input-control .lv-input:focus {
  outline: 2px solid rgba(45, 108, 223, 0.22);
  outline-offset: -2px;
}

.lv-count-input-field-total .lv-count-input-control {
  border-color: rgba(45, 108, 223, 0.22);
  box-shadow: inset 2px 0 0 rgba(45, 108, 223, 0.14);
}

.lv-count-input-field-live .lv-label {
  color: var(--lv-navy);
}

.lv-count-input-field-live .lv-count-input-control {
  border-color: #d4dae3;
}

.lv-count-input-field-live .lv-count-stepper {
  color: #000000;
}

.lv-count-input-field-live .lv-input {
  background:
    linear-gradient(90deg, rgba(3, 239, 219, 0.08) 0%, rgba(3, 239, 219, 0.03) 16%, #ffffff 38%);
}

.lv-count-input-field-live .lv-input:focus,
.lv-count-input-field-live .lv-count-stepper:focus-visible {
  outline-color: rgba(3, 239, 219, 0.28);
}

.lv-count-input-field-dead .lv-label {
  color: #A95A5A;
}

.lv-count-input-field-dead .lv-count-input-control {
  border-color: rgba(169, 90, 90, 0.34);
}

.lv-count-input-field-dead .lv-input {
  background:
    linear-gradient(90deg, rgba(169, 90, 90, 0.07) 0%, rgba(169, 90, 90, 0.03) 16%, #ffffff 38%);
}

.lv-count-input-field-dead .lv-input:focus,
.lv-count-input-field-dead .lv-count-stepper:focus-visible {
  outline-color: rgba(169, 90, 90, 0.26);
}

.lv-setup-actions {
  margin-top: 8px;
}

.lv-setup-actions .lv-btn {
  flex: 1 1 0;
  min-height: 46px;
}

.lv-hemo-table-wrap {
  max-width: 100%;
}

.lv-hemo-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.lv-hemo-table th,
.lv-hemo-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  overflow-wrap: anywhere;
}

.lv-hemo-table th {
  color: var(--lv-navy);
  background: var(--lv-bg);
  font-size: 13px;
}

@media (max-width: 850px) {
  .lv-calculator-layout {
    grid-template-columns: 1fr;
  }

  .lv-segmented-control {
    display: flex;
    width: 100%;
  }

  .lv-segmented-option {
    flex: 1 1 0;
    padding: 9px 10px;
  }

  .lv-grid-count-card-grid,
  .lv-compact-grid {
    grid-template-columns: 1fr;
  }
}
