﻿/* == BuildersCalc Pro - Shared Calculator Styles == */


/* -- Page Header (hero image band) -- */
.page-header {
  position: relative; width: 100%; aspect-ratio: 10 / 3; overflow: hidden; color: var(--white);
}
.page-header img.hero-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; display: block;
}
.page-header .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to right, rgba(12,20,40,.82) 0%, rgba(12,20,40,.55) 60%, rgba(12,20,40,.25) 100%);
}
.page-header .inner {
  position: relative; z-index: 2;
  max-width: 1240px; margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; flex-direction: column; justify-content: center;
}
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: #b0bcd4; margin-bottom: 16px; font-family: 'Roboto Condensed', Arial, sans-serif; }
.breadcrumb a { color: #b0bcd4; transition: color .2s; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { color: var(--gold); }
.page-header h1 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 900; letter-spacing: -.4px; margin-bottom: 8px; }
.page-header p { color: rgba(255,255,255,.8); font-size: .95rem; max-width: 560px; line-height: 1.6; }

/* -- Main Layout -- */
.main { max-width: 1240px; margin: 0 auto; padding: 40px 24px 64px; display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start; }

/* -- Calculator Card -- */
.calc-card { background: var(--white); border-radius: 12px; border: 1.5px solid var(--mid); overflow: hidden; }
.calc-card-header { padding: 22px 28px; border-bottom: 1.5px solid var(--mid); display: flex; align-items: center; gap: 14px; }
.calc-card-header .icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.calc-card-header h2 { font-size: 1.15rem; font-weight: 700; color: var(--navy); }
.calc-card-header p { font-size: .82rem; color: var(--muted); margin-top: 2px; }
.calc-body { padding: 28px; }

/* -- Form -- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
label { font-size: .83rem; font-weight: 600; color: var(--navy); font-family: 'Roboto Condensed', Arial, sans-serif; }
label .unit { font-weight: 400; color: var(--muted); }
input[type="number"], select {
  padding: 11px 14px; border: 1.5px solid var(--mid); border-radius: var(--radius);
  font-size: .95rem; color: var(--text); background: var(--white);
  transition: border-color .2s, box-shadow .2s; outline: none; width: 100%;
}
input[type="number"]:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245,166,35,.15); }
.field-hint { font-size: .77rem; color: var(--muted); font-family: 'Roboto Condensed', Arial, sans-serif; }

/* -- Slider -- */
.slider-row { display: flex; align-items: center; gap: 12px; }
input[type="range"] { flex: 1; accent-color: var(--gold); cursor: pointer; }
.slider-val { font-weight: 700; color: var(--gold); font-size: 1rem; min-width: 40px; text-align: right; }

/* -- Action Buttons -- */
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-calc { background: var(--gold); color: var(--navy); font-weight: 800; padding: 13px 28px; border: none; border-radius: var(--radius); font-size: 1rem; cursor: pointer; transition: background .2s; flex: 1; }
.btn-calc:hover { background: var(--gold2); }
.btn-clear { background: var(--light); color: var(--muted); font-weight: 600; padding: 13px 20px; border: 1.5px solid var(--mid); border-radius: var(--radius); font-size: .9rem; cursor: pointer; transition: background .2s; }
.btn-clear:hover { background: var(--mid); }

/* -- Unit Toggle -- */
.unit-toggle { display: flex; align-items: center; gap: 10px; background: var(--light); border: 1.5px solid var(--mid); border-radius: 8px; padding: 10px 16px; margin-bottom: 24px; }
.toggle-label { font-size: .85rem; font-weight: 600; color: var(--muted); transition: color .2s; }
.toggle-label.active { color: var(--navy); }
.toggle-switch { position: relative; width: 48px; height: 26px; background: var(--gold); border: none; border-radius: 13px; cursor: pointer; transition: background .2s; flex-shrink: 0; }
.toggle-switch.imperial { background: var(--navy); }
.toggle-knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: var(--white); border-radius: 50%; transition: transform .2s; display: block; }
.toggle-switch.imperial .toggle-knob { transform: translateX(22px); }
.ft-in-row { display: flex; align-items: center; gap: 8px; }
.ft-in-row input { width: 80px; }
.ft-in-row span { font-size: .85rem; color: var(--muted); font-weight: 600; }

/* -- Job Costing -- */
.costing { margin-bottom: 24px; padding: 20px; background: var(--light); border-radius: 8px; border: 1.5px solid var(--mid); }
.costing h3 { font-size: .88rem; font-weight: 700; color: var(--navy); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.costing .form-grid { margin-bottom: 0; }
.btn-optional { background: none; border: 1.5px dashed var(--mid); border-radius: var(--radius); color: var(--muted); font-size: .85rem; font-weight: 600; cursor: pointer; padding: 9px 16px; display: flex; align-items: center; gap: 8px; transition: border-color .2s, color .2s; width: 100%; }
.btn-optional:hover { border-color: var(--gold); color: var(--navy); }
.btn-optional svg { flex-shrink: 0; }
.cost-results { margin-top: 16px; border-top: 1.5px solid var(--mid); padding-top: 16px; }
.cost-results h4 { font-size: .88rem; font-weight: 700; color: var(--navy); margin-bottom: 12px; }
.cost-line { display: flex; justify-content: space-between; align-items: center; font-size: .88rem; padding: 6px 0; border-bottom: 1px solid var(--mid); color: var(--muted); }
.cost-line:last-child { border-bottom: none; }
.cost-line .cost-label { color: var(--text); }
.cost-line.total { font-weight: 800; font-size: 1rem; color: var(--navy); border-top: 2px solid var(--navy); margin-top: 4px; padding-top: 10px; }
.cost-line.total span:last-child { color: var(--gold); }

/* -- Results -- */
.results { display: none; margin-top: 28px; border-top: 1.5px solid var(--mid); padding-top: 24px; }
.results.visible { display: block; }
.results h3 { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 16px; }
.results-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 20px; }
.result-box { background: var(--light); border-radius: 8px; padding: 16px 18px; border: 1.5px solid var(--mid); }
.result-box.highlight { background: var(--navy); border-color: var(--navy); }
.result-box .label { font-size: .78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 6px; font-family: 'Roboto Condensed', Arial, sans-serif; }
.result-box.highlight .label { color: #8a9ab8; }
.result-box .value { font-size: 1.5rem; font-weight: 900; color: var(--navy); line-height: 1; }
.result-box.highlight .value { color: var(--gold); }
.result-box .sub { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.result-box.highlight .sub { color: #8a9ab8; }
.export-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-export { display: flex; align-items: center; gap: 7px; padding: 10px 18px; border-radius: var(--radius); font-size: .85rem; font-weight: 600; cursor: pointer; border: 1.5px solid var(--mid); background: var(--white); color: var(--text); transition: background .2s, border-color .2s; }
.btn-export:hover { background: var(--light); border-color: var(--navy); }

/* -- Sidebar -- */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.info-card { background: var(--white); border-radius: 12px; border: 1.5px solid var(--mid); overflow: hidden; }
.info-card-header { background: var(--navy); padding: 14px 20px; }
.info-card-header h3 { color: var(--white); font-size: .9rem; font-weight: 700; }
.info-card-body { padding: 18px 20px; }
.info-card-body p { font-size: .85rem; color: var(--muted); line-height: 1.65; margin-bottom: 10px; }
.info-card-body p:last-child { margin-bottom: 0; }
.info-card-body ul { padding-left: 16px; display: flex; flex-direction: column; gap: 6px; }
.info-card-body ul li { font-size: .85rem; color: var(--muted); line-height: 1.5; }
.info-card-body strong { color: var(--text); }

/* -- Related Calculators -- */
.related { background: var(--white); border-radius: 12px; border: 1.5px solid var(--mid); }
.related-header { padding: 14px 20px; border-bottom: 1.5px solid var(--mid); }
.related-header h3 { font-size: .9rem; font-weight: 700; color: var(--navy); }
.related-list { list-style: none; }
.related-list li a { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid var(--mid); font-size: .87rem; color: var(--text); transition: background .15s; }
.related-list li:last-child a { border-bottom: none; }
.related-list li a:hover { background: rgba(245,166,35,.07); color: var(--navy); }
.related-list li a svg { color: var(--muted); }

/* -- Responsive -- */
@media (max-width: 900px) {
  .main { grid-template-columns: 1fr; }
  .sidebar { order: -1; }
}
@media (max-width: 600px) {
  .page-header { aspect-ratio: 10 / 5; }
}
@media (max-width: 560px) {
  .form-grid { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: 1fr; }
}

