/* ============================================================
   SolutionMall — Calculator Pages Shared Stylesheet
   Inherits: ../shared.css (site-header, footer, btn, container)
   ============================================================ */

/* ---- CALC HERO ---- */
.calc-hero {
  background: linear-gradient(135deg, #0a1628 0%, #0d2145 50%, #0a1628 100%);
  padding: 100px 0 56px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.calc-hero .breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 20px;
}
.calc-hero .breadcrumb a { color: rgba(255,255,255,0.5); text-decoration: none; }
.calc-hero .breadcrumb a:hover { color: #fff; }
.calc-hero .breadcrumb span { color: rgba(255,255,255,0.3); }
.calc-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(59,130,246,0.15);
  border: 1px solid rgba(59,130,246,0.3);
  color: #60a5fa;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.calc-hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 12px;
}
.calc-hero p {
  font-size: 16px;
  color: rgba(255,255,255,0.65);
  max-width: 600px;
  line-height: 1.6;
  margin-bottom: 0;
}
.calc-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 20px;
}
.calc-hero-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}
.calc-hero-meta span strong { color: rgba(255,255,255,0.8); }

/* ---- MAIN LAYOUT ---- */
.calc-main {
  background: #0a1628;
  padding: 40px 0 80px;
  min-height: 60vh;
}
.calc-layout {
  display: grid;
  grid-template-columns: 380px 1fr 300px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 1200px) {
  .calc-layout {
    grid-template-columns: 340px 1fr;
  }
  .calc-aside { display: none; }
}
@media (max-width: 900px) {
  .calc-layout {
    grid-template-columns: 1fr;
  }
}

/* ---- PANELS ---- */
.calc-panel {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
}
.calc-panel-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 10px;
}
.calc-panel-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.calc-panel-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.calc-panel-icon.blue { background: rgba(59,130,246,0.2); }
.calc-panel-icon.green { background: rgba(16,185,129,0.2); }
.calc-panel-icon.amber { background: rgba(245,158,11,0.2); }
.calc-panel-body { padding: 24px; }

/* ---- FORM ELEMENTS ---- */
.form-group {
  margin-bottom: 20px;
}
.form-group:last-child { margin-bottom: 0; }
.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  margin-bottom: 8px;
}
.form-label .unit-badge {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.06);
  padding: 2px 8px;
  border-radius: 4px;
}
.form-control {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
  font-family: inherit;
}
.form-control:focus {
  border-color: #3b82f6;
  background: rgba(59,130,246,0.08);
}
.form-control.error {
  border-color: #ef4444;
  background: rgba(239,68,68,0.08);
}
.form-control option { background: #0d2145; color: #fff; }
select.form-control { cursor: pointer; }
.form-hint {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  margin-top: 5px;
}
.form-error {
  font-size: 11px;
  color: #f87171;
  margin-top: 5px;
  display: none;
}
.form-error.visible { display: block; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ---- RESULT AREA ---- */
.result-primary {
  background: linear-gradient(135deg, rgba(59,130,246,0.15) 0%, rgba(16,185,129,0.1) 100%);
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  text-align: center;
}
.result-primary .result-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 8px;
}
.result-primary .result-value {
  font-size: 48px;
  font-weight: 900;
  color: #fff;
  line-height: 1;
  margin-bottom: 4px;
}
.result-primary .result-unit {
  font-size: 20px;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
}
.result-primary .result-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-top: 8px;
}

/* Status badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  margin-top: 12px;
}
.status-badge.ok { background: rgba(16,185,129,0.2); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.status-badge.warn { background: rgba(245,158,11,0.2); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.status-badge.danger { background: rgba(239,68,68,0.2); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.status-badge.info { background: rgba(59,130,246,0.2); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }

/* Result rows */
.result-rows { display: flex; flex-direction: column; gap: 12px; }
.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
}
.result-row .rr-label {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
}
.result-row .rr-value {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.result-row .rr-value.highlight { color: #60a5fa; }
.result-row .rr-value.ok { color: #34d399; }
.result-row .rr-value.warn { color: #fbbf24; }
.result-row .rr-value.danger { color: #f87171; }

/* Recommendation box */
.recommendation-box {
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 10px;
  padding: 16px;
  margin-top: 16px;
}
.recommendation-box.warn-box {
  background: rgba(245,158,11,0.08);
  border-color: rgba(245,158,11,0.2);
}
.recommendation-box.danger-box {
  background: rgba(239,68,68,0.08);
  border-color: rgba(239,68,68,0.2);
}
.recommendation-box h4 {
  font-size: 13px;
  font-weight: 700;
  color: #34d399;
  margin: 0 0 8px;
}
.recommendation-box.warn-box h4 { color: #fbbf24; }
.recommendation-box.danger-box h4 { color: #f87171; }
.recommendation-box p {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  margin: 0;
  line-height: 1.5;
}

/* ---- ASIDE PANEL ---- */
.aside-section {
  margin-bottom: 20px;
}
.aside-section:last-child { margin-bottom: 0; }
.aside-section h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 12px;
}
.aside-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 13px;
}
.aside-item:last-child { border-bottom: none; }
.aside-item .ai-label { color: rgba(255,255,255,0.45); }
.aside-item .ai-value { color: rgba(255,255,255,0.8); font-weight: 500; }
.aside-warning {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  line-height: 1.5;
  margin-top: 12px;
}
.aside-warning .aw-icon { color: #fbbf24; flex-shrink: 0; }

/* ---- STANDARD TABLE ---- */
.std-table-wrap {
  overflow-x: auto;
  margin-top: 16px;
}
.std-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.std-table th {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.6);
  font-weight: 600;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.std-table td {
  padding: 9px 12px;
  color: rgba(255,255,255,0.75);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.std-table tr:hover td { background: rgba(255,255,255,0.03); }
.std-table tr.highlighted td {
  background: rgba(59,130,246,0.12);
  color: #fff;
  font-weight: 600;
}
.std-table tr.highlighted td:first-child {
  border-left: 3px solid #3b82f6;
}

/* ---- BACK BUTTON ---- */
.calc-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  padding: 8px 0;
  transition: color 0.2s;
}
.calc-back-btn:hover { color: #fff; }

/* ---- ADVANCED TOGGLE ---- */
.advanced-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  padding: 10px 0;
  border: none;
  background: none;
  width: 100%;
  transition: color 0.2s;
}
.advanced-toggle:hover { color: rgba(255,255,255,0.7); }
.advanced-toggle .toggle-icon {
  transition: transform 0.2s;
  font-size: 10px;
}
.advanced-toggle.open .toggle-icon { transform: rotate(180deg); }
.advanced-content {
  display: none;
  padding-top: 4px;
}
.advanced-content.open { display: block; }

/* ---- CALC NAV (back to calculators) ---- */
.calc-nav-bar {
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 10px 0;
}
.calc-nav-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.calc-nav-links {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.calc-nav-link {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.45);
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.calc-nav-link:hover { color: #fff; background: rgba(255,255,255,0.06); }
.calc-nav-link.active { color: #60a5fa; background: rgba(59,130,246,0.12); }

/* ---- PLACEHOLDER STATE ---- */
.result-placeholder {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255,255,255,0.25);
}
.result-placeholder .rp-icon { font-size: 40px; margin-bottom: 12px; }
.result-placeholder p { font-size: 14px; }

/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {
  .calc-hero { padding: 80px 0 40px; }
  .calc-panel-body { padding: 16px; }
  .result-primary .result-value { font-size: 36px; }
  .form-row { grid-template-columns: 1fr; }
}
