/* Breakeven Calculator App Styles */

.calc-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 1em;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}

.calc-container h2 {
  margin: 1em 0 1em 0;
  font-size: 1.8em;
  font-weight: bold;
  color: #00583E;
}

/* Sections */
.calc-section {
  margin-bottom: 1.5em;
}

.calc-section h3 {
  margin: 0 0 0.4em 0;
  font-size: 1.1em;
  color: #333;
  /*border-bottom: 2px solid #006a4e;*/
  padding-bottom: 0.2em;
}

/* Tables - shared */
.calc-table {
  width: 100%;
  border-collapse: collapse;
  border: 2px solid #ddd;
  border-radius: 4px;
  margin-bottom: 0.5em;
}

.calc-table th,
.calc-table td {
  padding: 4px 8px;
  border: 1px solid #e8e8e8;
  vertical-align: middle;
}

.calc-table thead th {
  background: #f5f5f5;
  font-weight: bold;
  text-align: center;
  font-size: 0.95em;
}

.calc-table tbody td:first-child {
  font-weight: normal;
  white-space: nowrap;
}

/* Input table */
.input-table {
  max-width: 500px;
}

.input-table td:first-child {
  width: 300px;
}

.input-table td:last-child {
  width: 140px;
}

.input-table input[type="number"],
.input-table input[type="date"],
.input-table input[type="text"] {
  width: 140px;
  padding: 3px 6px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 14px;
  text-align: right;
  box-sizing: border-box;
}

.input-table input[type="date"] {
  width: 140px;
  text-align: left;
}

.input-table input:focus {
  border-color: #00583E;
  outline: none;
  box-shadow: 0 0 3px rgba(0, 106, 78, 0.3);
}

/* Output tables */
.output-table {
  max-width: 950px;
}

.output-table td.label,
.metrics-table td.label,
.alt-table td.label {
  width: 250px;
  min-width: 100px;
}

.output-table td.val,
.metrics-table td.val,
.alt-table td.val {
  text-align: right; 
  white-space: nowrap;
  width: 120px;
  min-width: 100px;
}

.output-table td.note,
.metrics-table td.note,
.alt-table td.note {
  font-size: 0.95em;
  color: #666;
  font-style: italic;
  /*max-width: 200px;*/
  white-space: normal;
}

/* Negative values */
.negative {
  color: #c00;
}

/* Summary rows */
tr.summary-row td {
  border-top: 2px solid #999;
  font-weight: bold;
}

tr.subtotal-row td {
  border-top: 1px solid #999;
  font-weight: bold;
}

/* Metrics table */
.metrics-table {
  max-width: 950px;
}

/* Market alternatives table */
.alt-table {
  max-width: 950px;
}

.alt-table thead th {
  min-width: 110px;
}

/* Formula note */
.formula-note {
  margin-top: 1em;
  padding: 0.75em 1em;
  background: #f9f9f9;
  border-left: 3px solid #006a4e;
  font-size: 0.9em;
  color: #555;
}

/* Print styles */
@media print {
  .calc-container {
    max-width: 100%;
    padding: 0;
    font-size: 11px;
  }

  .calc-table {
    page-break-inside: avoid;
  }

  .input-table input {
    border: none;
    background: none;
    padding: 0;
    font-size: 11px;
  }

  .formula-note {
    border-left-color: #000;
  }
}
