/* ─── Calculator Page — Custom Styles ────────────────────────────────────────
   Page-specific styles for calculator.php.
   Shared design-system components live in general.css.
─────────────────────────────────────────────────────────────────────────── */

/* ══════════════════════════════════════════════════════════════════════
   CALCULATOR TOOL SECTION
══════════════════════════════════════════════════════════════════════ */
.calc-section {
  padding: 100px 0;
  background: #f7f8fa;
}

.calc-card {
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 4px 40px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

/* ── Material Tabs ───────────────────────────────────────────────── */
.calc-tabs {
  display: flex;
  border-bottom: 2px solid #e8e8e8;
}

.calc-tab {
  flex: 1;
  padding: 16px 12px;
  background: transparent;
  border: none;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #888;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.calc-tab i {
  font-size: 1.1rem;
}

.calc-tab:hover {
  color: #0047BB;
  background: #f0f5ff;
}

.calc-tab.active[data-material="stone"] {
  color: #0047BB;
  border-bottom-color: #0047BB;
  background: #f5f8ff;
}

.calc-tab.active[data-material="aggregate"] {
  color: #CB6015;
  border-bottom-color: #CB6015;
  background: #fff8f3;
}

.calc-tab.active[data-material="topsoil"] {
  color: #36573B;
  border-bottom-color: #36573B;
  background: #f3f8f3;
}

/* ── Form Body ───────────────────────────────────────────────────── */
.calc-form-body {
  padding: 36px 40px;
}

@media (max-width: 575px) {
  .calc-form-body { padding: 24px 20px; }
}

.calc-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

@media (max-width: 767px) {
  .calc-form-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.calc-field label {
  display: block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #75787B;
  margin-bottom: 8px;
}

.calc-field input[type="number"] {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e0e0e0;
  border-radius: 3px;
  font-family: 'Barlow', sans-serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: #0a0a0a;
  background: #fafafa;
  transition: border-color 0.2s, background 0.2s;
  -moz-appearance: textfield;
}

.calc-field input[type="number"]::-webkit-outer-spin-button,
.calc-field input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.calc-field input[type="number"]:focus {
  outline: none;
  border-color: #0047BB;
  background: #fff;
}

.calc-field input[type="number"].has-error {
  border-color: #d9534f;
  background: #fff8f8;
}

/* ── Depth input group (input + unit select fused together) ──────── */
.calc-depth-group {
  display: flex;
  align-items: stretch;
  border: 1.5px solid #e0e0e0;
  border-radius: 3px;
  background: #fafafa;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
}

.calc-depth-group:focus-within {
  border-color: #0047BB;
  background: #fff;
}

.calc-depth-group input[type="number"] {
  flex: 1;
  min-width: 0;
  width: auto; /* override .calc-field input width:100% */
  padding: 12px 16px;
  border: none;
  background: transparent;
  font-family: 'Barlow', sans-serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: #0a0a0a;
  outline: none;
  -moz-appearance: textfield;
}

/* suppress focus border from .calc-field input:focus — group wrapper handles it */
.calc-depth-group input[type="number"]:focus {
  border: none;
  background: transparent;
}

.calc-depth-group input[type="number"]::-webkit-outer-spin-button,
.calc-depth-group input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.calc-depth-group select {
  flex-shrink: 0;
  padding: 0 14px 0 10px;
  border: none;
  border-left: 1.5px solid #e0e0e0;
  background: #f0f0f0;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #555;
  cursor: pointer;
  outline: none;
  appearance: auto;
  transition: border-color 0.2s;
}

.calc-depth-group:focus-within select {
  border-left-color: #b8d0ff;
}

/* ── Result Box ──────────────────────────────────────────────────── */
.calc-result {
  background: #0a0a0a;
  border-radius: 3px;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.calc-result-primary {
  flex: 1;
  min-width: 160px;
}

.calc-result-number {
  font-family: 'Teko', sans-serif;
  font-size: clamp(2.8rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1;
  color: #ffffff;
  display: block;
}

.calc-result-unit {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #888;
  display: block;
  margin-top: 4px;
}

.calc-result-divider {
  width: 1px;
  height: 52px;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
}

.calc-result-recommended {
  flex: 1;
  min-width: 160px;
}

.calc-result-rec-number {
  font-family: 'Teko', sans-serif;
  font-size: clamp(2.0rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1;
  color: #CB6015;
  display: block;
}

.calc-result-rec-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #666;
  display: block;
  margin-top: 4px;
}

.calc-result-action {
  flex-shrink: 0;
}

@media (max-width: 575px) {
  .calc-result { padding: 20px 20px; gap: 16px; }
  .calc-result-divider { display: none; }
}

/* ── Reset/Note strip ────────────────────────────────────────────── */
.calc-note-strip {
  margin-top: 14px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-family: 'Barlow', sans-serif;
  font-size: 0.82rem;
  color: #888;
  line-height: 1.6;
}

.calc-note-strip i {
  color: #CB6015;
  font-size: 0.9rem;
  margin-top: 1px;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════════
   TIPS PANEL (right column)
══════════════════════════════════════════════════════════════════════ */
.calc-tips-panel {
  position: sticky;
  top: 100px;
}

.calc-tips-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.calc-tips-icon {
  width: 48px;
  height: 48px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.calc-tips-icon.blue  { background: #e8efff; color: #0047BB; }
.calc-tips-icon.orange { background: #fff1e6; color: #CB6015; }
.calc-tips-icon.green  { background: #eaf2eb; color: #36573B; }

.calc-tips-heading {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0a0a0a;
  margin: 0 0 2px;
}

.calc-tips-subhead {
  font-size: 0.82rem;
  color: #888;
  margin: 0;
}

.calc-tip-item {
  border-left: 3px solid #e8e8e8;
  padding: 0 0 24px 20px;
  margin-bottom: 0;
  position: relative;
}

.calc-tip-item:last-child {
  padding-bottom: 0;
}

.calc-tip-item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #e8e8e8;
}

.calc-tip-item.active-tip {
  border-left-color: #0047BB;
}

.calc-tip-item.active-tip::before {
  background: #0047BB;
}

.calc-tip-item[data-tip-style="orange"].active-tip { border-left-color: #CB6015; }
.calc-tip-item[data-tip-style="orange"].active-tip::before { background: #CB6015; }

.calc-tip-item[data-tip-style="green"].active-tip { border-left-color: #36573B; }
.calc-tip-item[data-tip-style="green"].active-tip::before { background: #36573B; }

.calc-tip-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #CB6015;
  margin-bottom: 4px;
  display: block;
}

.calc-tip-item.active-tip .calc-tip-label { color: #0047BB; }
.calc-tip-item[data-tip-style="orange"].active-tip .calc-tip-label { color: #CB6015; }
.calc-tip-item[data-tip-style="green"].active-tip .calc-tip-label { color: #36573B; }

.calc-tip-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.0rem;
  font-weight: 700;
  color: #0a0a0a;
  margin: 0 0 6px;
  line-height: 1.2;
}

.calc-tip-body {
  font-family: 'Barlow', sans-serif;
  font-size: 0.875rem;
  color: #555;
  line-height: 1.75;
  margin: 0;
}

.calc-tips-cta {
  margin-top: 28px;
  padding: 20px 24px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.calc-tips-cta:hover { opacity: 0.88; }

.calc-tips-cta.blue  { background: #0047BB; }
.calc-tips-cta.orange { background: #CB6015; }
.calc-tips-cta.green  { background: #36573B; }

.calc-tips-cta-text {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  display: block;
  margin-bottom: 2px;
}

.calc-tips-cta-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  display: block;
}

.calc-tips-cta i {
  color: rgba(255,255,255,0.7);
  font-size: 1.3rem;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════════
   HOW IT WORKS SECTION
══════════════════════════════════════════════════════════════════════ */
.calc-how-section {
  padding: 100px 0;
  background: #ffffff;
}

.calc-step-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 60px;
}

@media (max-width: 767px) {
  .calc-step-grid { grid-template-columns: 1fr; gap: 32px; }
}

.calc-step {
  text-align: center;
  position: relative;
}

.calc-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 28px;
  right: -20px;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, #e0e0e0 0%, #e0e0e0 100%);
}

@media (max-width: 767px) {
  .calc-step:not(:last-child)::after { display: none; }
}

.calc-step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #0047BB;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-family: 'Teko', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
}

.calc-step h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0a0a0a;
  margin-bottom: 10px;
}

.calc-step p {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.8;
  margin: 0;
}

/* ── Formula Box ─────────────────────────────────────────────────── */
.calc-formula-section {
  margin-top: 80px;
}

.calc-formula-box {
  background: #0a0a0a;
  border-radius: 4px;
  padding: 48px 56px;
  display: flex;
  align-items: center;
  gap: 56px;
  flex-wrap: wrap;
}

@media (max-width: 767px) {
  .calc-formula-box { padding: 32px 24px; gap: 32px; }
}

.calc-formula-equation {
  flex: 1;
  min-width: 260px;
  text-align: center;
}

.calc-formula-text {
  font-family: 'Teko', sans-serif;
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.calc-formula-text strong {
  color: #ffffff;
  font-weight: 700;
}

.calc-formula-text .formula-divide {
  display: block;
  border-top: 2px solid rgba(255,255,255,0.3);
  margin: 6px auto;
  width: 200px;
}

.calc-formula-result {
  font-family: 'Teko', sans-serif;
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  font-weight: 700;
  color: #CB6015;
  display: block;
  margin-top: 10px;
}

.calc-formula-divider {
  width: 1px;
  height: 80px;
  background: rgba(255,255,255,0.1);
  flex-shrink: 0;
}

@media (max-width: 575px) { .calc-formula-divider { display: none; } }

.calc-formula-explainer {
  flex: 2;
  min-width: 260px;
}

.calc-formula-explainer h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.0rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #CB6015;
  margin-bottom: 14px;
}

.calc-formula-explainer p {
  font-family: 'Barlow', sans-serif;
  font-size: 0.92rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.85;
  margin-bottom: 10px;
}

.calc-formula-explainer p:last-child { margin: 0; }

.calc-formula-highlight {
  color: #ffffff;
  font-weight: 500;
}

/* ── Cubic Yard Visual ───────────────────────────────────────────── */
.calc-yard-visual {
  margin-top: 60px;
}

.calc-yard-card {
  background: #f7f8fa;
  border: 1.5px solid #e8e8e8;
  border-radius: 4px;
  padding: 36px 40px;
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}

@media (max-width: 575px) {
  .calc-yard-card { padding: 24px 20px; gap: 24px; }
}

.calc-yard-cube {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  position: relative;
}

.calc-yard-cube svg {
  width: 100%;
  height: 100%;
}

.calc-yard-text h4 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0a0a0a;
  margin-bottom: 8px;
}

.calc-yard-text p {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.8;
  margin: 0;
}

/* ══════════════════════════════════════════════════════════════════════
   DEPTH REFERENCE GUIDE
══════════════════════════════════════════════════════════════════════ */
.calc-depth-section {
  padding: 100px 0;
  background: #f7f8fa;
}

.calc-depth-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 56px;
}

@media (max-width: 991px) {
  .calc-depth-grid { grid-template-columns: 1fr; }
}

.calc-depth-card {
  background: #ffffff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

.calc-depth-card-header {
  padding: 24px 28px 20px;
  border-bottom: 2px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.calc-depth-card-header.blue  { border-top: 4px solid #0047BB; }
.calc-depth-card-header.orange { border-top: 4px solid #CB6015; }
.calc-depth-card-header.green  { border-top: 4px solid #36573B; }

.calc-depth-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.calc-depth-card-icon.blue  { background: #e8efff; color: #0047BB; }
.calc-depth-card-icon.orange { background: #fff1e6; color: #CB6015; }
.calc-depth-card-icon.green  { background: #eaf2eb; color: #36573B; }

.calc-depth-card-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0a0a0a;
  margin: 0;
}

.calc-depth-card-body {
  padding: 24px 28px 28px;
}

.calc-depth-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  gap: 12px;
}

.calc-depth-row:last-child { border-bottom: none; padding-bottom: 0; }
.calc-depth-row:first-child { padding-top: 0; }

.calc-depth-app {
  font-size: 0.88rem;
  color: #444;
  line-height: 1.4;
}

.calc-depth-value {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  white-space: nowrap;
  flex-shrink: 0;
}

.calc-depth-value.blue  { color: #0047BB; }
.calc-depth-value.orange { color: #CB6015; }
.calc-depth-value.green  { color: #36573B; }

.calc-depth-card-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity 0.2s, padding-left 0.2s;
  border-top: 1px solid #f0f0f0;
}

.calc-depth-card-link.blue  { color: #0047BB; }
.calc-depth-card-link.orange { color: #CB6015; }
.calc-depth-card-link.green  { color: #36573B; }

.calc-depth-card-link:hover { opacity: 0.75; padding-left: 32px; }

/* ══════════════════════════════════════════════════════════════════════
   ORDERING TIPS SECTION
══════════════════════════════════════════════════════════════════════ */
.calc-ordering-section {
  padding: 100px 0;
  background: #ffffff;
}

.calc-ordering-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 56px;
}

@media (max-width: 767px) {
  .calc-ordering-grid { grid-template-columns: 1fr; }
}

.calc-ordering-item {
  display: flex;
  gap: 20px;
  padding: 28px 24px;
  border: 1.5px solid #e8e8e8;
  border-radius: 3px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.calc-ordering-item:hover {
  border-color: #0047BB;
  box-shadow: 0 4px 20px rgba(0,71,187,0.07);
}

.calc-ordering-icon {
  width: 48px;
  height: 48px;
  background: #e8efff;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0047BB;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.calc-ordering-item h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.0rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0a0a0a;
  margin-bottom: 8px;
}

.calc-ordering-item p {
  font-size: 0.88rem;
  color: #555;
  line-height: 1.75;
  margin: 0;
}

/* ══════════════════════════════════════════════════════════════════════
   CTA BAND
══════════════════════════════════════════════════════════════════════ */
.calc-cta-band {
  background: #0047BB;
  padding: 80px 0;
}

.calc-cta-band h2 {
  font-family: 'Teko', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.1;
  color: #ffffff;
  margin-bottom: 12px;
}

.calc-cta-band p {
  font-size: 1.0rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.8;
  margin: 0;
}
