/**
 * Stile für die Finanzen-Seite
 */

/* Importiere alle Komponenten-Stile */
@import 'components/bab-filter.css';
@import 'components/bab-overview.css';
@import 'components/bab-summary.css';

/* Überschriften-Stile */
h1 #page-subtitle {
  font-size: 0.7em;
  font-weight: normal;
  color: #6c757d;
}

h1 #dataset-count {
  font-size: 1em;
  font-weight: normal;
}

/* Container-Stile */
.finanzen-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.widget.full-width {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0 auto;
}

.chart-container {
  height: 600px;
  position: relative;
}

#bab-filter-container {

}

.display-mode-toggle {
  display: flex;
  align-items: center;
  margin-top: 10px;
  padding: 10px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.toggle-label {
  margin-right: 10px;
  font-weight: bold;
}

.toggle-state {
  margin-left: 10px;
}

.toggle-switch-container {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 28px;
}

.toggle-switch-checkbox {
  height: 0;
  width: 0;
  opacity: 0;
}

.toggle-switch-label {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.toggle-switch-inner {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

.toggle-switch-checkbox:checked + .toggle-switch-label {
  background-color: #2196F3;
}

.toggle-switch-checkbox:checked + .toggle-switch-label .toggle-switch-inner {
  transform: translateX(32px);
}

.display-mode-toggle button {
  padding: 8px 12px;
  margin-left: 10px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background-color: #f8f9fa;
  cursor: pointer;
  font-weight: bold;
}

.display-mode-toggle button.active {
  background-color: #007bff;
  color: white;
  border-color: #0056b3;
}

.error-message {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 40px;
  color: #dc3545;
  background-color: #f8d7da;
  border-radius: 8px;
  margin-top: 20px;
}

.error-message i {
  font-size: 2rem;
  margin-bottom: 10px;
}

/* Chart-Stile */
.chart-title {
  font-size: 18px;
  font-weight: bold;
  text-align: center;
  margin-bottom: 15px;
}

.bu-chart-container {
  margin-top: 30px;
  border-top: 1px solid #eee;
  padding-top: 20px;
}

.chart-legend {
  margin-top: 10px;
  font-size: 14px;
}

.chart-legend-item {
  display: inline-block;
  margin-right: 15px;
  margin-bottom: 5px;
}

.chart-legend-color {
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 5px;
  vertical-align: middle;
  border-radius: 3px;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
  .chart-container {
    height: 300px;
  }
  
  .display-mode-toggle {
    text-align: center;
  }

  .display-mode-toggle button {
    margin-bottom: 5px;
    width: 100%;
    margin-left: 0;
  }
}

/* Tooltip-Stile */
.chart-tooltip {
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  pointer-events: none;
  position: absolute;
  z-index: 100;
  max-width: 250px;
}

.chart-tooltip-title {
  font-weight: bold;
  margin-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 3px;
}

.chart-tooltip-value {
  white-space: nowrap;
}

/* Filter-Panel-Stile für Finanzen */
.finanzen-filter-panel {
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
  border: 1px solid #e9ecef;
}

.finanzen-filter-panel .filter-group {
  margin-bottom: 15px;
}

.finanzen-filter-panel label {
  font-weight: bold;
  display: block;
  margin-bottom: 5px;
}

.finanzen-filter-panel select,
.finanzen-filter-panel input {
  width: 100%;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #ced4da;
}

.finanzen-filter-panel .btn-group {
  margin-top: 15px;
  text-align: right;
}

.finanzen-filter-panel .btn-apply {
  background-color: #28a745;
  color: white;
  padding: 8px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.finanzen-filter-panel .btn-reset {
  background-color: #dc3545;
  color: white;
  margin-left: 10px;
  padding: 8px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

/* Tabellenstile für Monatsübersicht */
.summary-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  font-size: 14px;
}

.summary-table th,
.summary-table td {
  padding: 10px;
  text-align: right;
  border-bottom: 1px solid #dee2e6;
}

.summary-table th:first-child,
.summary-table td:first-child {
  text-align: left;
}

.summary-table th {
  background-color: #f8f9fa;
  font-weight: bold;
}

.summary-table tr:hover {
  background-color: #f5f5f5;
}

.summary-table .positive {
  color: #28a745;
}

.summary-table .negative {
  color: #dc3545;
}

.summary-table .neutral {
  color: #6c757d;
}

.summary-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 25px;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}

.stat-item {
  flex: 1;
  min-width: 200px;
  padding: 10px;
  border-radius: 5px;
  background-color: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-item.highlight {
  background-color: #f0f9ff;
  border-left: 3px solid #0d6efd;
}

.stat-label {
  font-weight: bold;
  margin-bottom: 5px;
}

.stat-value {
  font-size: 1.2rem;
  font-weight: bold;
}

.stat-value.positive {
  color: #28a745;
}

.stat-value.negative {
  color: #dc3545;
} 