/* Titration Simulator Styles */

.titration-simulator-container {
  margin-top: 20px;
  margin-bottom: 40px;
}

/* Calculator Section */
.calculator-section {
  margin: 20px 0;
}

.calculator-panel {
  background-color: #f8f9fa;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.calculator-panel h2 {
  color: #333;
  margin-bottom: 20px;
}

.calculator-panel h3 {
  color: #495057;
  margin-top: 25px;
  margin-bottom: 15px;
  font-size: 18px;
  border-bottom: 2px solid #dee2e6;
  padding-bottom: 8px;
}

.panel-section {
  margin-bottom: 30px;
}

/* Form Groups */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  color: #495057;
  font-weight: 600;
  margin-bottom: 8px;
}

.form-control {
  padding: 12px 15px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
  border-color: #6f42c1;
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(111, 66, 193, 0.25);
}

.help-block {
  color: #6c757d;
  font-size: 14px;
  margin-top: 5px;
}

/* Buttons */
.btn {
  padding: 12px 25px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-primary {
  background-color: #6f42c1;
  border-color: #6f42c1;
}

.btn-primary:hover {
  background-color: #5a32a3;
  border-color: #4e2c8f;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(111, 66, 193, 0.3);
}

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

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

/* Quick Examples */
.quick-examples {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #dee2e6;
}

.quick-examples p {
  margin-bottom: 15px;
  color: #495057;
  font-weight: 600;
}

.example-btn {
  margin: 5px;
  padding: 8px 15px;
  background-color: #fff;
  border: 1px solid #6f42c1;
  color: #6f42c1;
  border-radius: 5px;
  transition: all 0.2s;
  cursor: pointer;
  display: inline-block;
  font-size: 14px;
}

.example-btn:hover {
  background-color: #6f42c1;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(111, 66, 193, 0.3);
}

/* Result Cards */
.result-card {
  background-color: #fff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 20px;
  animation: fadeIn 0.3s ease-in;
}

.result-card h3 {
  color: #6f42c1;
  margin-bottom: 20px;
  font-size: 20px;
}

/* Data Rows */
.data-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  margin-bottom: 8px;
  background-color: #f8f9fa;
  border-radius: 6px;
  border-left: 4px solid #6f42c1;
  transition: transform 0.2s;
}

.data-row:hover {
  transform: translateX(5px);
}

.data-label {
  color: #495057;
  font-weight: 600;
  font-size: 15px;
}

.data-value {
  color: #6f42c1;
  font-weight: 700;
  font-size: 15px;
  font-family: 'Courier New', monospace;
}

.data-value.value-important {
  color: #e74c3c;
  font-size: 16px;
}

/* Chart Container */
#titration-chart {
  position: relative;
  height: 400px;
  width: 100%;
}

/* Educational Section */
.educational-section {
  margin: 40px 0;
}

.educational-section h2 {
  color: #333;
  margin-bottom: 30px;
  text-align: center;
}

.info-card {
  background-color: #fff;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  height: 100%;
  margin-bottom: 20px;
}

.info-card h3 {
  color: #6f42c1;
  margin-bottom: 15px;
  font-size: 18px;
}

.info-card p {
  color: #495057;
  line-height: 1.6;
  margin-bottom: 15px;
}

.info-card ul {
  color: #495057;
  line-height: 1.8;
}

.info-card li {
  margin-bottom: 8px;
}

.info-card .formula {
  font-family: 'Courier New', monospace;
  background-color: #f8f9fa;
  padding: 8px 12px;
  border-radius: 4px;
  margin: 10px 0;
  color: #495057;
  text-align: center;
  font-weight: 600;
}

/* Tables */
.table-responsive {
  margin-top: 15px;
}

.table {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
}

.table thead {
  background-color: #6f42c1;
  color: #fff;
}

.table th {
  font-weight: 600;
  border: none;
  padding: 12px;
}

.table td {
  padding: 12px;
  vertical-align: middle;
}

.table tbody tr {
  transition: background-color 0.2s;
}

.table tbody tr:hover {
  background-color: #f8f9fa;
}

.table-sm td,
.table-sm th {
  padding: 8px;
}

/* Error Section */
.alert {
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  animation: fadeIn 0.3s ease-in;
}

.alert-danger {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

.alert i {
  margin-right: 10px;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .calculator-panel {
    padding: 20px;
  }

  .data-row {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }

  .example-btn {
    display: block;
    margin: 10px auto;
    width: 90%;
  }

  .table {
    font-size: 14px;
  }

  .table th,
  .table td {
    padding: 8px 6px;
  }

  .formula {
    font-size: 13px !important;
  }

  #titration-chart {
    height: 300px;
  }

  .data-value {
    font-size: 14px;
  }
}
