/**
 * Bindungspotential Rechner Styles
 * WCAG 2.1 AA Compliant - Optimized for accessibility
 */

.bindungspotential-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.calculator-panel {
  background: #f8f9fa;
  padding: 30px;
  border-radius: 10px;
  margin-bottom: 30px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 2px solid #e0e0e0;
}

.calculator-panel h2 {
  color: #1a1a1a;
  margin-bottom: 15px;
}

.input-section {
  margin: 20px 0;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 5px;
  display: block;
}

.form-control {
  padding: 10px;
  border: 2px solid #8b95a3;
  border-radius: 5px;
  font-size: 16px;
  color: #1a1a1a;
  background: white;
}

.form-control:focus {
  outline: none;
  border-color: #1565c0;
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.2);
}

.input-group {
  display: flex;
  align-items: stretch;
}

.input-group input[type='range'] {
  flex: 1;
  padding: 5px;
  border: none;
}

.input-group input[type='range']:focus {
  outline: 3px solid #ffc107;
  outline-offset: 2px;
}

.input-group input[type='number'] {
  flex: 1;
  padding: 10px;
  border: 2px solid #8b95a3;
  border-radius: 5px 0 0 5px;
  font-size: 16px;
  color: #1a1a1a;
}

.input-group input[type='number']:focus {
  outline: none;
  border-color: #1565c0;
  box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.2);
}

.input-group-addon {
  padding: 10px 15px;
  background: #e9ecef;
  border: 2px solid #8b95a3;
  border-left: none;
  border-radius: 0 5px 5px 0;
  font-weight: 600;
  color: #1a1a1a;
  min-width: 100px;
  text-align: center;
}

.bond-info,
.kinetics-info {
  background: white;
  padding: 20px;
  border-radius: 8px;
  margin: 20px 0;
  border: 2px solid #e0e0e0;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #e0e0e0;
}

.info-row:last-child {
  border-bottom: none;
}

.info-row .label {
  font-weight: 600;
  color: #1a1a1a;
}

.info-row .value {
  font-size: 1.1em;
  color: #1565c0;
  font-weight: 600;
}

.info-row .value.highlight {
  color: #e74c3c;
  font-size: 1.2em;
}

.btn {
  padding: 10px 20px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s;
  cursor: pointer;
  border-radius: 5px;
  border: none;
}

.btn-primary {
  background: #1565c0;
  color: #ffffff;
}

.btn-primary:hover {
  background: #0d47a1;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary:focus-visible {
  outline: 3px solid #ffc107;
  outline-offset: 2px;
}

.btn-success {
  background: #28a745;
  color: white;
}

.btn-success:hover {
  background: #218838;
}

.btn-warning {
  background: #ffc107;
  color: #1a1a1a;
}

.btn-warning:hover {
  background: #e0a800;
}

.btn-default {
  background: #6c757d;
  color: white;
}

.btn-info {
  background: #17a2b8;
  color: white;
}

.btn-info:hover {
  background: #138496;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 14px;
}

.btn-lg {
  padding: 15px 30px;
  font-size: 18px;
}

.btn-block {
  width: 100%;
  display: block;
}

.diagram-container {
  background: white;
  padding: 20px;
  border-radius: 10px;
  margin: 30px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 2px solid #e0e0e0;
}

.diagram-container h3 {
  color: #1a1a1a;
  text-align: center;
  margin-bottom: 15px;
}

canvas {
  border: 2px solid #8b95a3;
  border-radius: 8px;
  background: white;
  max-width: 100%;
  height: auto;
}

.diagram-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

.reaction-equation {
  background: #e3f2fd;
  padding: 15px;
  border-radius: 8px;
  margin: 20px 0;
  border-left: 5px solid #1565c0;
  border: 2px solid #90caf9;
}

.reaction-equation h4 {
  color: #1565c0;
  margin-top: 0;
  margin-bottom: 10px;
}

.formula-text {
  font-family: 'Courier New', monospace;
  font-size: 1.1em;
  font-weight: bold;
  color: #1565c0;
  background: white;
  padding: 10px 15px;
  border-radius: 5px;
  text-align: center;
  border: 2px solid #1565c0;
  margin: 10px 0;
}

.energy-values {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
}

.energy-card {
  flex: 1;
  background: white;
  padding: 20px;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
  text-align: center;
}

.energy-card h5 {
  color: #1565c0;
  margin-bottom: 15px;
}

.energy-value {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.energy-value .label {
  font-weight: 600;
  color: #1a1a1a;
  font-size: 0.9em;
}

.energy-value .value {
  font-size: 1.2em;
  color: #1565c0;
  font-weight: 700;
}

.energy-value .value.large {
  font-size: 1.5em;
  color: #e74c3c;
}

.energy-arrow {
  font-size: 2em;
  color: #1565c0;
  font-weight: bold;
}

.reaction-result {
  margin: 30px 0;
}

.result-box {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 25px;
  border-radius: 10px;
  text-align: center;
  color: white;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.result-box h4 {
  margin-top: 0;
  margin-bottom: 15px;
}

.result-box .value.large {
  font-size: 2.5em;
  font-weight: 700;
  display: block;
  margin: 10px 0;
}

.result-box .value.highlight {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.result-box .explanation {
  font-size: 1.1em;
  margin-top: 15px;
}

.simulation-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 20px 0;
}

.diagram-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid #333;
}

.legend-item span {
  font-weight: 600;
  color: #1a1a1a;
}

.diagram-annotations {
  margin-top: 20px;
  position: relative;
}

.annotation-item {
  position: relative;
  margin: 15px 0;
}

.annotation-line {
  position: absolute;
  width: 2px;
  height: 40px;
  background: #e74c3c;
  left: 50%;
  top: -30px;
}

.annotation-text {
  font-weight: 600;
  color: #e74c3c;
  text-align: center;
  margin-top: -10px;
}

.temperature-comparison {
  margin-top: 20px;
}

.temperature-comparison h4 {
  color: #1a1a1a;
  text-align: center;
  margin-bottom: 15px;
}

.educational-content {
  margin: 40px 0;
}

.educational-content h2 {
  text-align: center;
  color: #1a1a1a;
  margin-bottom: 30px;
}

.info-card {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  border-left: 5px solid #2e7d32;
  border: 2px solid #e0e0e0;
  height: 100%;
}

.info-card h3 {
  color: #2e7d32;
  margin-bottom: 15px;
}

.info-card h4,
.info-card h5 {
  color: #1565c0;
  margin-top: 0;
  margin-bottom: 10px;
}

.info-card p {
  margin: 10px 0;
  color: #1a1a1a;
  line-height: 1.6;
}

.info-card ul,
.info-card ol {
  margin: 15px 0;
  padding-left: 20px;
  line-height: 1.6;
}

.info-card li {
  margin: 8px 0;
  color: #1a1a1a;
}

.info-card .formula-text {
  font-size: 1em;
  margin: 15px 0;
  background: #e3f2fd;
  border-color: #90caf9;
}

.example-card {
  background: white;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  border-left: 5px solid #1565c0;
  border: 2px solid #e0e0e0;
}

.example-card h3 {
  color: #1565c0;
  margin-bottom: 15px;
}

.table {
  background: white;
  border-radius: 5px;
  overflow: hidden;
  border: 2px solid #e0e0e0;
  width: 100%;
}

.table thead {
  background: #1565c0;
  color: white;
}

.table th {
  font-weight: 600;
  padding: 12px;
  border: 2px solid #0d47a1;
  text-align: left;
}

.table td {
  padding: 10px 12px;
  border-top: 2px solid #e0e0e0;
  color: #1a1a1a;
}

.table-striped tbody tr:nth-of-type(odd) {
  background: rgba(21, 101, 192, 0.05);
}

.table tbody tr:hover {
  background: rgba(21, 101, 192, 0.1);
}

.table tbody tr:focus {
  outline: 2px solid #1565c0;
  outline-offset: -2px;
}

.rule-of-thumb {
  background: #fff3cd;
  padding: 15px;
  border-radius: 8px;
  margin: 15px 0;
  border-left: 5px solid #ffc107;
  border: 2px solid #ffe082;
}

.rule-of-thumb h4 {
  color: #856404;
  margin-top: 0;
  margin-bottom: 10px;
}

.rule-of-thumb p {
  margin: 8px 0;
  color: #1a1a1a;
}

.rule-of-thumb .small {
  font-size: 0.9em;
  color: #666;
}

.application-examples {
  margin-top: 15px;
}

.application-examples h5 {
  color: #1565c0;
  margin-bottom: 10px;
}

.examples-section {
  margin: 40px 0;
}

.examples-section h2 {
  text-align: center;
  color: #1a1a1a;
  margin-bottom: 30px;
}

.interactive-example {
  background: white;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  border: 2px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.interactive-example h3 {
  color: #1565c0;
  margin-bottom: 15px;
}

.interactive-example p {
  margin: 10px 0;
  color: #1a1a1a;
  line-height: 1.6;
}

.catalyst-demo,
.coordinate-demo {
  margin-top: 20px;
}

.demo-controls {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  border: 2px solid #e0e0e0;
}

.demo-controls label {
  font-weight: 600;
  color: #1a1a1a;
  margin: 5px 10px 5px 0;
  display: inline-block;
}

.demo-controls input[type='checkbox'] {
  margin-right: 8px;
}

.demo-controls input[type='range'] {
  width: 100%;
  margin: 10px 0;
}

.demo-controls input[type='range']:focus {
  outline: 3px solid #ffc107;
  outline-offset: 2px;
}

.alert {
  padding: 15px 20px;
  border-radius: 8px;
  margin: 20px 0;
  border: 2px solid;
}

.alert-info {
  background: #d1ecf1;
  border-color: #bee5eb;
  color: #0c5460;
}

.alert-warning {
  background: #fff3cd;
  border-color: #ffeaa7;
  color: #856404;
}

.alert h4 {
  margin-top: 0;
  margin-bottom: 10px;
}

.alert p,
.alert ul {
  margin: 8px 0;
  color: inherit;
}

.alert li {
  margin: 5px 0;
}

.table-condensed {
  font-size: 0.9em;
}

.table-condensed th,
.table-condensed td {
  padding: 6px 10px;
}

.sub {
  vertical-align: sub;
  font-size: 0.7em;
}

sup {
  vertical-align: super;
  font-size: 0.7em;
}

@media (max-width: 768px) {
  .bindungspotential-container {
    padding: 10px;
  }

  .calculator-panel,
  .info-card,
  .example-card,
  .interactive-example {
    padding: 15px;
  }

  .energy-values {
    flex-direction: column;
  }

  .simulation-controls {
    flex-direction: column;
  }

  .diagram-legend {
    flex-direction: column;
  }

  canvas {
    width: 100%;
    height: auto;
  }

  .diagram-controls {
    flex-direction: column;
  }
}

@media (prefers-color-scheme: dark) {
  .bindungspotential-container {
    color: #e0e0e0;
  }

  .calculator-panel,
  .info-card {
    background: #1a1a1a;
    border-color: #404040;
  }

  .calculator-panel h2,
  .educational-content h2,
  .examples-section h2 {
    color: #e0e0e0;
  }

  .form-group label {
    color: #e0e0e0;
  }

  .form-control {
    background: #2c2c2c;
    color: #e0e0e0;
    border-color: #555;
  }

  .input-group-addon {
    background: #2c2c2c;
    color: #e0e0e0;
    border-color: #555;
  }

  .bond-info,
  .kinetics-info {
    background: #2c2c2c;
    border-color: #404040;
  }

  .info-row {
    border-bottom-color: #404040;
  }

  .info-row .label {
    color: #c0c0c0;
  }

  .info-row .value {
    color: #64b5f6;
  }

  .info-row .value.highlight {
    color: #ff6b6b;
  }

  .diagram-container {
    background: #1a1a1a;
    border-color: #404040;
  }

  .diagram-container h3 {
    color: #e0e0e0;
  }

  canvas {
    border-color: #404040;
  }

  .reaction-equation {
    background: #1a3c5e;
    border-color: #0d47a1;
  }

  .reaction-equation h4 {
    color: #64b5f6;
  }

  .formula-text {
    background: #2c2c2c;
    color: #64b5f6;
    border-color: #0d47a1;
  }

  .energy-card,
  .example-card,
  .interactive-example {
    background: #1a1a1a;
    border-color: #404040;
  }

  .energy-card h5,
  .example-card h3,
  .interactive-example h3 {
    color: #64b5f6;
  }

  .result-box {
    background: linear-gradient(135deg, #5e35b1 0%, #3b2f63 100%);
  }

  .table {
    background: #1a1a1a;
    border-color: #404040;
    color: #e0e0e0;
  }

  .table thead {
    background: #0d47a1;
  }

  .table th {
    border-color: #0d47a1;
  }

  .table td {
    border-color: #404040;
    color: #e0e0e0;
  }

  .table-striped tbody tr:nth-of-type(odd) {
    background: rgba(100, 181, 246, 0.1);
  }

  .table tbody tr:hover {
    background: rgba(100, 181, 246, 0.15);
  }

  .demo-controls {
    background: #2c2c2c;
    border-color: #404040;
  }

  .demo-controls label {
    color: #e0e0e0;
  }

  .alert-info {
    background: #1a3c5e;
    border-color: #0d47a1;
    color: #b8daff;
  }

  .alert-warning {
    background: #1a3c5e;
    border-color: #0d47a1;
    color: #ffc107;
  }

  .rule-of-thumb {
    background: #1a3c5e;
    border-color: #0d47a1;
  }

  .rule-of-thumb h4 {
    color: #ffc107;
  }

  .rule-of-thumb p,
  .rule-of-thumb .small {
    color: #b8daff;
  }
}
