/* Veerenstael Bijtelling stijl */
body {
  margin: 0;
  font-family: 'Roboto', 'Inter', Arial, sans-serif;
  background: #2A6085;
  min-height: 100vh;
}

.dashboard-bg {
  min-height: 100vh;
  background: #2A6085;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 0;
}

.logo-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 36px;
}
.veerenstael-logo {
  width: 340px;
  max-width: 80vw;
  height: auto;
  display: block;
  margin: 22px auto 0 auto;
}
.subtitle-title {
  font-size: 1.3rem;
  font-weight: bold;
  color: #fff;
  letter-spacing: 2px;
  margin-top: 6px;
  margin-bottom: 10px;
  text-align: center;
  text-transform: uppercase;
}

.main-card {
  background: #FBF5EC;
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  padding: 32px 40px;
  max-width: 1100px;
  width: 100%;
  color: #1D1D1B;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
}
.header { text-align: center; }
.header p { color: #1D1D1B; }

/* Definitie-sectie */
.definitions-section {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
  border: 2px solid #BFD4DA;
}

.definitions-title {
  color: #2A6085;
  margin: 0 0 16px 0;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
}

.definitions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.def-btn {
  background: #FFFFFF;
  color: #2A6085;
  border: 2px solid #2A6085;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.def-btn:hover {
  background: #BFD4DA;
  border-color: #2A6085;
  transform: translateY(-2px);
}

.def-btn.active {
  background: #2A6085;
  border-color: #2A6085;
  color: #fff;
}

.def-explanation {
  background: #FFFFFF;
  border-radius: 8px;
  padding: 20px;
  margin-top: 16px;
  animation: slideDown 0.3s ease;
  border: 2px solid #BFD4DA;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.def-content {
  color: #1D1D1B;
  line-height: 1.7;
  font-size: 1rem;
}

.def-content strong {
  color: #2A6085;
}

/* Diagram sectie */
.diagram-section {
  margin: 24px 0;
}

.diagram-container {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid #BFD4DA;
}

.diagram-img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

/* SVG Diagram styling */
#mtbfDiagram {
  background: #FFFFFF;
  border-radius: 8px;
  max-height: 320px;
}

#mtbfDiagram text {
  font-family: 'Roboto', 'Inter', Arial, sans-serif;
}

#mtbfDiagram rect {
  transition: all 0.3s ease;
}

#mtbfDiagram rect:hover {
  opacity: 1 !important;
  transform: translateY(-1px);
}

#mtbfDiagram line {
  transition: all 0.2s ease;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 28px;
}

.left-column,
.right-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.input-section,
.result-section,
.formulas-section {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 24px;
  border: 2px solid #BFD4DA;
}

.section-title {
  color: #2A6085;
  font-size: 1.4rem;
  margin: 0 0 20px 0;
  font-weight: 700;
}

form label {
  display: block;
  margin-bottom: 6px;
  margin-top: 12px;
  font-weight: 500;
  color: #1D1D1B;
}

form label:first-of-type {
  margin-top: 0;
}

.input-subtitle {
  font-size: 0.85rem;
  color: #666;
  font-style: italic;
  margin-bottom: 8px;
  margin-top: -4px;
}

/* Analysis type toggle */
.analysis-type-toggle {
  background: #FFFFFF;
  border-radius: 8px;
  padding: 16px;
  border: 2px solid #BFD4DA;
}

.toggle-label {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  color: #1D1D1B;
  margin-bottom: 12px;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-option {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 10px;
  border-radius: 6px;
  transition: background 0.2s;
}

.radio-option:hover {
  background: #f5f5f5;
}

.radio-option input[type="radio"] {
  width: auto;
  margin-right: 10px;
  cursor: pointer;
  accent-color: #2A6085;
}

.radio-text {
  color: #1D1D1B;
  font-size: 0.95rem;
}

.radio-option input[type="radio"]:checked + .radio-text {
  color: #2A6085;
  font-weight: 600;
}

/* Input groups */
.input-group {
  background: #FFFFFF;
  border-radius: 8px;
  padding: 16px;
  border: 2px solid #BFD4DA;
}

.group-title {
  font-size: 1rem;
  font-weight: 600;
  color: #2A6085;
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #BFD4DA;
}

form input, form select {
  width: 100%;
  background: #FFFFFF;
  color: #1D1D1B;
  border: 2px solid #BFD4DA;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 6px;
  font-size: 1rem;
  box-sizing: border-box;
}
form input:focus, form select:focus { 
  outline: none;
  border-color: #2A6085;
  box-shadow: 0 0 0 3px rgba(42, 96, 133, 0.1);
}

/* input + unit selector naast elkaar */
.unit-row {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 12px;
  align-items: center;
  margin-bottom: 6px;
}

.button-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 18px;
}
button {
  border: none;
  border-radius: 9px;
  padding: 14px 26px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  margin-bottom: 0;
  transition: all 0.3s ease;
}
button.green {
  background: #2A6085;
  color: #fff;
}
button.green:hover { 
  background: #1f4d6b;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(42, 96, 133, 0.3);
}
button.reset-btn {
  background: #BFD4DA;
  color: #1D1D1B;
}
button.reset-btn:hover { 
  background: #a8c3ce;
}
button.export-btn {
  background: #2A6085;
  color: #fff;
  width: 100%;
  margin-top: 20px;
}
button.export-btn:hover { 
  background: #1f4d6b;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(42, 96, 133, 0.3);
}

.result-section {
  display: flex;
  flex-direction: column;
  margin-top: 24px;
}

.result-unit-selector {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.result-unit-selector label {
  color: #1D1D1B;
  font-size: 0.95rem;
  margin: 0;
}

.result-unit-selector select {
  background: #FFFFFF;
  color: #1D1D1B;
  border: 2px solid #BFD4DA;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.95rem;
  cursor: pointer;
}

.result-unit-selector select:focus {
  outline: none;
  border-color: #2A6085;
  box-shadow: 0 0 0 3px rgba(42, 96, 133, 0.1);
}

.result-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 1rem;
  margin-bottom: 0;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #BFD4DA;
}

.result-row:last-child {
  border-bottom: none;
}

.result-label {
  color: #1D1D1B;
  font-weight: 600;
}

.result-value {
  color: #2A6085;
  font-weight: 600;
  text-align: right;
}

/* Wetenschappelijke formule-notatie */
.formulas {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 12px;
}

.info-block {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.95rem;
  margin-top: 12px;
  border: 1px solid #BFD4DA;
}

.formula-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #BFD4DA;
}

.formula-item:last-child {
  border-bottom: none;
}

.formula-label {
  font-weight: 600;
  color: #1D1D1B;
  min-width: 160px;
  flex-shrink: 0;
}

.fraction {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  vertical-align: middle;
}

.frac-num,
.frac-den {
  color: #1D1D1B;
  padding: 2px 8px;
  text-align: center;
  font-size: 0.9rem;
}

.frac-line {
  width: 100%;
  height: 1px;
  background: #2A6085;
  margin: 2px 0;
}

.formula-simple {
  color: #1D1D1B;
  font-size: 0.95rem;
}

.small-note { color: #666; font-size: 0.9rem; }

/* Responsive aanpassingen */
@media (max-width: 968px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
  
  .definitions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .result-grid {
    grid-template-columns: 1fr;
  }
  
  .button-row {
    flex-direction: column;
  }
  
  button {
    width: 100%;
  }
}

/* Info tooltip styling */
.info-tooltip {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 8px;
  background: #2A6085;
  color: #fff;
  border-radius: 50%;
  text-align: center;
  font-size: 11px;
  line-height: 16px;
  cursor: help;
  font-weight: bold;
}

.info-tooltip:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 24px;
  top: -8px;
  background: #FFFFFF;
  color: #1D1D1B;
  padding: 12px;
  border-radius: 6px;
  width: 280px;
  font-size: 13px;
  line-height: 1.5;
  font-weight: normal;
  z-index: 1000;
  border: 2px solid #2A6085;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.info-tooltip:hover::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 6px;
  border: 6px solid transparent;
  border-right-color: #2A6085;
  z-index: 1001;
}

/* Info icons - NIEUW KLIK SYSTEEM */
.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2A6085;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  margin-left: 8px;
  padding: 0;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  flex-shrink: 0;
  line-height: 1;
}

.info-icon:hover {
  background: #1f4d6b;
}

.info-icon.active {
  background: #E0A943;
}

/* Expandable info panel */
.info-panel {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  background: #FFFFFF;
  border-left: 3px solid #2A6085;
  margin-top: 0;
  margin-left: 30px;
  border-radius: 0 8px 8px 0;
}

.info-panel.open {
  max-height: 300px;
  opacity: 1;
  margin-top: 8px;
  overflow-y: auto;
}

.info-panel-content {
  padding: 16px 18px;
  color: #1D1D1B;
  font-size: 0.9rem;
  line-height: 1.7;
}

.info-panel-content strong {
  color: #2A6085;
}

@media (max-width: 768px) {
  .info-panel {
    margin-left: 10px;
  }
  
  .info-panel-content {
    font-size: 0.85rem;
  }
}

/* Radio option wrapper voor expandable info */
.radio-option-wrapper {
  width: 100%;
}
