/* Fenestration Services — Installation Labour Cost V3 */
nav.pricing-tabs {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
nav.pricing-tabs .fs-icp-tab {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid #d6dee8;
  border-radius: 8px;
  background: #fff;
  color: #071a36;
  font: inherit;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}
nav.pricing-tabs .fs-icp-tab:hover { background: #f5f8fb; }
nav.pricing-tabs .fs-icp-tab.fs-icp-tab-active {
  border-color: #073866 !important;
  background: #073866 !important;
  color: #fff !important;
  box-shadow: none !important;
}
nav.pricing-tabs.fs-icp-labour-active ~ *:not(#fs-installation-cost-pricing) {
  display: none !important;
}

#fs-installation-cost-pricing {
  --fs-icp-navy: #071a36;
  --fs-icp-navy-2: #081e40;
  --fs-icp-gold: #b59060;
  --fs-icp-border: #d8e0ea;
  --fs-icp-muted: #64748b;
  box-sizing: border-box;
  margin: 18px 0 24px;
  border: 1px solid var(--fs-icp-border);
  border-radius: 14px;
  background: #fff;
  color: #14213d;
  box-shadow: 0 8px 24px rgba(4, 17, 38, .06);
  overflow: hidden;
}
#fs-installation-cost-pricing[hidden] { display: none !important; }
#fs-installation-cost-pricing *,
#fs-installation-cost-pricing *::before,
#fs-installation-cost-pricing *::after { box-sizing: border-box; }

.fs-icp-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  padding: 24px 26px 18px;
  border-bottom: 1px solid #edf1f5;
}
.fs-icp-heading h2 {
  margin: 4px 0 8px;
  color: var(--fs-icp-navy);
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
}
.fs-icp-heading p {
  margin: 0;
  max-width: 780px;
  color: var(--fs-icp-muted);
  line-height: 1.55;
}
.fs-icp-kicker {
  display: block;
  color: var(--fs-icp-gold);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .15em;
}
.fs-icp-switches {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  min-width: 190px;
}
.fs-icp-switch {
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  cursor: pointer;
  color: var(--fs-icp-navy);
}
.fs-icp-switch input { position: absolute; opacity: 0; pointer-events: none; }
.fs-icp-switch span {
  width: 46px;
  height: 26px;
  padding: 3px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: .2s ease;
}
.fs-icp-switch span::after {
  content: '';
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.22);
  transition: .2s ease;
}
.fs-icp-switch input:checked + span { background: var(--fs-icp-navy); }
.fs-icp-switch input:checked + span::after { transform: translateX(20px); }
.fs-icp-switch b { font-size: 13px; }

.fs-icp-alert {
  margin: 18px 26px 0;
  padding: 13px 15px;
  border: 1px solid #e6d7c1;
  border-radius: 10px;
  background: #fcf8f1;
  color: #6a5234;
  line-height: 1.45;
  font-size: 13px;
}
.fs-icp-alert--enabled {
  border-color: #bdd7c5;
  background: #f0f8f2;
  color: #265c35;
}

.fs-icp-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 16px;
  padding: 22px 26px 8px;
}
.fs-icp-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.fs-icp-field > span {
  color: var(--fs-icp-navy);
  font-size: 12px;
  font-weight: 800;
}
.fs-icp-field small {
  color: var(--fs-icp-muted);
  font-size: 11px;
  line-height: 1.35;
}
.fs-icp-field input,
.fs-icp-field select,
.fs-icp-table input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #162236;
  font: inherit;
  outline: none;
}
.fs-icp-field input:focus,
.fs-icp-field select:focus,
.fs-icp-table input:focus {
  border-color: var(--fs-icp-gold);
  box-shadow: 0 0 0 3px rgba(181,144,96,.14);
}

.fs-icp-derived-bar {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 12px 26px 0;
  padding: 13px 15px;
  border-radius: 10px;
  background: #f4f7fb;
}
.fs-icp-derived-bar > div { min-width: 185px; }
.fs-icp-derived-bar span {
  display: block;
  color: var(--fs-icp-muted);
  font-size: 11px;
  font-weight: 700;
}
.fs-icp-derived-bar strong {
  display: block;
  margin-top: 3px;
  color: var(--fs-icp-navy);
  font-size: 16px;
}
.fs-icp-derived-bar small {
  margin-left: auto;
  max-width: 520px;
  color: var(--fs-icp-muted);
  line-height: 1.4;
}
.fs-icp-material-note {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 10px 26px 0;
  padding: 10px 14px;
  border: 1px solid #e6eaf0;
  border-radius: 9px;
  background: #fff;
  font-size: 12px;
}
.fs-icp-material-note strong { color: var(--fs-icp-navy); }
.fs-icp-material-note span { color: #334155; font-weight: 800; }
.fs-icp-material-note small { margin-left: auto; color: var(--fs-icp-muted); }

.fs-icp-section { padding: 24px 26px 0; }
.fs-icp-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.fs-icp-section-heading h3 {
  margin: 0 0 4px;
  color: var(--fs-icp-navy);
  font-size: 17px;
}
.fs-icp-section-heading p {
  margin: 0;
  color: var(--fs-icp-muted);
  font-size: 12px;
  line-height: 1.45;
}

.fs-icp-crew-card {
  margin-top: 16px;
  border: 1px solid var(--fs-icp-border);
  border-radius: 11px;
  background: #fff;
  overflow: hidden;
}
.fs-icp-crew-card:first-child { margin-top: 0; }
.fs-icp-crew-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--fs-icp-border);
}
.fs-icp-crew-card-heading h4 {
  margin: 0;
  color: var(--fs-icp-navy);
  font-size: 15px;
  font-weight: 800;
}
.fs-icp-crew-card-heading span {
  display: block;
  margin-top: 2px;
  color: var(--fs-icp-muted);
  font-size: 11px;
}
.fs-icp-crew-card .fs-icp-table-wrap {
  border: 0;
  border-radius: 0;
}

.fs-icp-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--fs-icp-border);
  border-radius: 11px;
}
.fs-icp-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}
.fs-icp-crew-table { min-width: 1180px; }
.fs-icp-table-wrap--tiers .fs-icp-table { min-width: 560px; }
.fs-icp-table th {
  padding: 10px 12px;
  background: #f4f7fb;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  text-align: left;
  border-bottom: 1px solid var(--fs-icp-border);
  white-space: nowrap;
}
.fs-icp-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #edf1f5;
  vertical-align: middle;
}
.fs-icp-table tbody tr:last-child td { border-bottom: 0; }
.fs-icp-table input { min-width: 88px; min-height: 36px; }
.fs-icp-crew-table td:nth-child(5) input { min-width: 112px; }
.fs-icp-percent-input {
  display: flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.fs-icp-percent-input span { padding: 0 9px; color: #64748b; font-weight: 700; }
.fs-icp-percent-input input {
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  min-width: 78px;
}
.fs-icp-derived { white-space: nowrap; }
.fs-icp-derived span {
  display: block;
  color: var(--fs-icp-muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.fs-icp-derived strong {
  display: block;
  margin-top: 3px;
  color: var(--fs-icp-navy);
}
.fs-icp-derived-total strong { font-size: 14px; }
.fs-icp-remove-tier,
.fs-icp-remove-crew {
  border: 0;
  background: transparent;
  color: #a13434;
  font-weight: 700;
  cursor: pointer;
}

.fs-icp-formula {
  margin: 24px 26px 0;
  padding: 15px 16px;
  border-left: 4px solid var(--fs-icp-gold);
  background: #fbfaf7;
}
.fs-icp-formula strong,
.fs-icp-formula span,
.fs-icp-formula small { display: block; }
.fs-icp-formula strong { color: var(--fs-icp-navy); margin-bottom: 5px; }
.fs-icp-formula span {
  margin-top: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #374151;
  font-size: 12px;
}
.fs-icp-formula small { margin-top: 7px; color: var(--fs-icp-muted); }
.fs-icp-message {
  min-height: 18px;
  margin: 14px 26px 0;
  font-size: 12px;
  font-weight: 700;
}
.fs-icp-message--error { color: #a13434; }
.fs-icp-message--success { color: #287044; }
.fs-icp-message--working { color: #725a36; }
.fs-icp-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 26px 24px;
}
.fs-icp-actions > div { margin-right: auto; max-width: 620px; }
.fs-icp-actions > div strong,
.fs-icp-actions > div span { display: block; }
.fs-icp-actions > div strong { color: var(--fs-icp-navy); font-size: 12px; }
.fs-icp-actions > div span {
  margin-top: 3px;
  color: var(--fs-icp-muted);
  font-size: 11px;
  line-height: 1.35;
}
.fs-icp-primary-btn,
.fs-icp-secondary-btn {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.fs-icp-primary-btn {
  border: 1px solid var(--fs-icp-navy);
  background: var(--fs-icp-navy);
  color: #fff;
}
.fs-icp-secondary-btn {
  border: 1px solid #cbd5e1;
  background: #fff;
  color: var(--fs-icp-navy);
}
.fs-icp-primary-btn:disabled,
.fs-icp-secondary-btn:disabled { opacity: .55; cursor: wait; }
.fs-icp-panel--error {
  padding: 18px 22px;
  border-color: #e9b8b8 !important;
  background: #fff7f7 !important;
}
.fs-icp-panel--error h2 { margin: 0 0 6px; color: #7f1d1d; }
.fs-icp-panel--error p { margin: 0; color: #991b1b; }

@media (max-width: 1180px) {
  .fs-icp-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .fs-icp-derived-bar { flex-wrap: wrap; }
  .fs-icp-derived-bar small { width: 100%; margin-left: 0; }
  .fs-icp-material-note { flex-wrap: wrap; }
  .fs-icp-material-note small { width: 100%; margin-left: 0; }
}
@media (max-width: 900px) {
  .fs-icp-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .fs-icp-heading { flex-direction: column; }
  .fs-icp-switches { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 680px) {
  .fs-icp-grid { grid-template-columns: 1fr; }
  .fs-icp-actions { flex-wrap: wrap; }
  .fs-icp-actions > div { width: 100%; margin: 0 0 8px; }
  .fs-icp-primary-btn, .fs-icp-secondary-btn { flex: 1 1 140px; }
  .fs-icp-alert,
  .fs-icp-grid,
  .fs-icp-section,
  .fs-icp-formula,
  .fs-icp-message,
  .fs-icp-actions,
  .fs-icp-derived-bar,
  .fs-icp-material-note { margin-left: 16px; margin-right: 16px; }
  .fs-icp-grid, .fs-icp-section, .fs-icp-actions { padding-left: 0; padding-right: 0; }
  .fs-icp-crew-card-heading { align-items: flex-start; flex-direction: column; }
}


/* ============================================================
   V4K — ORIGINAL LABOUR COST LAYOUT + REQUESTED ADDITIONS ONLY
   Base stylesheet above is the original V4D layout.
   These rules are scoped only to the crew table additions.
   ============================================================ */

/* Fold / unfold control beside Add Quantity Range. */
#fs-installation-cost-pricing .fs-icp-crew-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
#fs-installation-cost-pricing .fs-icp-toggle-crew {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  background: #fff;
  color: var(--fs-icp-navy);
  font: inherit;
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
#fs-installation-cost-pricing .fs-icp-toggle-crew:hover,
#fs-installation-cost-pricing .fs-icp-toggle-crew:focus-visible {
  border-color: var(--fs-icp-gold);
  outline: none;
}
#fs-installation-cost-pricing .fs-icp-crew-card--collapsed .fs-icp-table-wrap {
  display: none;
}
#fs-installation-cost-pricing .fs-icp-crew-card--collapsed .fs-icp-crew-card-heading {
  border-bottom: 0;
}

/* Keep the original table/card appearance. Fit the two requested additional
   cost columns without the forced desktop horizontal scrollbar. */
#fs-installation-cost-pricing .fs-icp-crew-card .fs-icp-table-wrap {
  overflow-x: hidden;
}
#fs-installation-cost-pricing .fs-icp-crew-table-costs {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed;
}
#fs-installation-cost-pricing .fs-icp-crew-table-costs th,
#fs-installation-cost-pricing .fs-icp-crew-table-costs td {
  min-width: 0 !important;
  padding-left: 6px;
  padding-right: 6px;
  vertical-align: middle;
}
#fs-installation-cost-pricing .fs-icp-crew-table-costs th {
  white-space: normal;
  line-height: 1.2;
}
#fs-installation-cost-pricing .fs-icp-crew-table-costs input {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
  padding-left: 7px;
  padding-right: 7px;
}

/* Requested compact input columns. */
#fs-installation-cost-pricing .fs-icp-crew-table-costs th:nth-child(1),
#fs-installation-cost-pricing .fs-icp-crew-table-costs td:nth-child(1) { width: 5.5%; }
#fs-installation-cost-pricing .fs-icp-crew-table-costs th:nth-child(2),
#fs-installation-cost-pricing .fs-icp-crew-table-costs td:nth-child(2) { width: 5.5%; }
#fs-installation-cost-pricing .fs-icp-crew-table-costs th:nth-child(3),
#fs-installation-cost-pricing .fs-icp-crew-table-costs td:nth-child(3) { width: 6.5%; }
#fs-installation-cost-pricing .fs-icp-crew-table-costs th:nth-child(4),
#fs-installation-cost-pricing .fs-icp-crew-table-costs td:nth-child(4) { width: 6.5%; }
#fs-installation-cost-pricing .fs-icp-crew-table-costs th:nth-child(5),
#fs-installation-cost-pricing .fs-icp-crew-table-costs td:nth-child(5) { width: 8%; }

/* Existing derived columns + two additions. */
#fs-installation-cost-pricing .fs-icp-crew-table-costs th:nth-child(6),
#fs-installation-cost-pricing .fs-icp-crew-table-costs td:nth-child(6) { width: 8%; }
#fs-installation-cost-pricing .fs-icp-crew-table-costs th:nth-child(7),
#fs-installation-cost-pricing .fs-icp-crew-table-costs td:nth-child(7) { width: 8%; }
#fs-installation-cost-pricing .fs-icp-crew-table-costs th:nth-child(8),
#fs-installation-cost-pricing .fs-icp-crew-table-costs td:nth-child(8) { width: 9%; }
#fs-installation-cost-pricing .fs-icp-crew-table-costs th:nth-child(9),
#fs-installation-cost-pricing .fs-icp-crew-table-costs td:nth-child(9) { width: 11%; }
#fs-installation-cost-pricing .fs-icp-crew-table-costs th:nth-child(10),
#fs-installation-cost-pricing .fs-icp-crew-table-costs td:nth-child(10) { width: 10.5%; }
#fs-installation-cost-pricing .fs-icp-crew-table-costs th:nth-child(11),
#fs-installation-cost-pricing .fs-icp-crew-table-costs td:nth-child(11) { width: 10.5%; }
#fs-installation-cost-pricing .fs-icp-crew-table-costs th:nth-child(12),
#fs-installation-cost-pricing .fs-icp-crew-table-costs td:nth-child(12) { width: 6%; }

#fs-installation-cost-pricing .fs-icp-crew-table-costs .fs-icp-derived strong {
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Only genuinely narrow screens may scroll. Desktop/admin widths stay scrollbar-free. */
@media (max-width: 850px) {
  #fs-installation-cost-pricing .fs-icp-crew-card .fs-icp-table-wrap {
    overflow-x: auto;
  }
  #fs-installation-cost-pricing .fs-icp-crew-table-costs {
    min-width: 1080px !important;
  }
}
