/* Price tables and calculator on the "How much does X cost?" articles (inc/cost-pages.php).
   Colours follow the site's TastyDaily palette, as in hub.css. */

.tmf-cost-table table { min-width: 520px; }
.tmf-cost-table th[scope="row"] { white-space: nowrap; text-align: left; }
.tmf-cost-table td { white-space: nowrap; }
.tmf-cost-table__none { color: #858585; font-size: .9em; }
.tmf-cost-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* First column stays put when the table scrolls sideways on a phone. */
.tmf-cost-table th[scope="row"],
.tmf-cost-table thead th:first-child { position: sticky; left: 0; z-index: 1; background: #fff; }
.tmf-cost-table figcaption { font-size: 14px; color: #5b6470; }

.tmf-calc {
  margin: 24px 0 32px;
  padding: 22px 24px;
  background: #f6f8f5;
  border: 1px solid #e4e7e4;
  border-left: 4px solid #5EAD39;
  border-radius: 16px;
  color: #243F2F;
}
.tmf-calc__title { margin: 0 0 14px; font-size: 20px; font-weight: 700; line-height: 1.3; }
.tmf-calc__fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.tmf-calc__fields label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; }
.tmf-calc__fields select,
.tmf-calc__fields input {
  width: 100%; min-height: 44px; padding: 8px 10px;
  border: 1px solid #c9d2c4; border-radius: 10px; background: #fff;
  font: inherit; font-size: 16px; font-weight: 400; color: #243F2F;
}
.tmf-calc__out { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 12px; }
.tmf-calc__out > div { padding: 10px 12px; background: #fff; border: 1px solid #e4e7e4; border-radius: 12px; }
.tmf-calc__out dt { margin: 0; font-size: 13px; font-weight: 600; color: #5b6470; }
.tmf-calc__out dd { margin: 2px 0 0; font-size: 18px; font-weight: 700; }
.tmf-calc__out .is-big { border-color: #5EAD39; }
.tmf-calc__out .is-big dd { font-size: 22px; }
.tmf-calc__note { margin: 0 0 14px; font-size: 14px; line-height: 1.5; color: #5b6470; }
.tmf-calc__cta {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border-radius: 10px; background: #5EAD39; color: #fff !important;
  font-weight: 700; text-decoration: none !important;
}
.tmf-calc__cta:hover, .tmf-calc__cta:focus-visible { background: #4d9130; }

/* The answer box at the top of each article. */
.tmf-cost-answer {
  margin: 0 0 24px; padding: 16px 20px;
  background: #f6f8f5; border-left: 4px solid #5EAD39; border-radius: 0 12px 12px 0;
}
.tmf-cost-answer p { margin: 0 0 6px; }
.tmf-cost-answer p:last-child { margin: 0; font-size: 14px; color: #5b6470; }

@media (max-width: 640px) {
  .tmf-calc { padding: 16px; }
  .tmf-calc__fields { grid-template-columns: 1fr 1fr; }
  .tmf-calc__fields label:last-child { grid-column: 1 / -1; }
  .tmf-calc__out { grid-template-columns: 1fr 1fr; }
  .tmf-calc__out .is-big { grid-column: 1 / -1; order: -1; }
  .tmf-calc__cta { width: 100%; justify-content: center; }
}
