/* ============================
   Basis-Layout & Bootstrap-like Utility
============================ */
.button-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.chevron-icon {
  transition: transform 0.3s ease;
}

.chevron-icon.rotate {
  transform: rotate(-180deg);
}

.collapse-group {
  overflow: hidden;
  transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out;
  max-height: 0;
  opacity: 0;
  display: block;
}

.collapse-group.show {
  max-height: 2000px;
  opacity: 1;
}

.sub-input {
  font-size: 0.85em;
  margin-top: 4px;
}

.anbieter {
  font-size: 0.8em;
  margin-top: 4px;
}

.neue-position-btn {
  display: block;
  margin: 0.5rem auto 1rem auto;
}

.collapse-toggle {
  cursor: pointer;
}

.collapse-row.hide {
  display: none;
}

/* ============================
   Ab Desktop (optional)
============================ */
@media (min-width: 576px) {
  .button-grid .btn {
    min-width: 140px;
  }
}

/* ============================
   Mobile-Optimierung (Smartphones)
============================ */
@media (max-width: 576px) {
  body {
    padding: 0.5rem;
    font-size: 0.9rem;
  }

  h1 {
    font-size: 1.3rem;
    text-align: center;
  }
   h2 {
    text-align: center;
  }

  .form-control,
  .form-select {
    font-size: 0.9rem;
    padding: 0.4rem 0.75rem;
  }

  .table th,
  .table td {
    font-size: 0.85rem;
    padding: 0.4rem;
    white-space: nowrap;
  }

  .table td input,
  .table td select {
    font-size: 0.85rem;
  }

  .button-grid {
    flex-direction: column;
    align-items: stretch;
  }

  .button-grid .btn {
    width: 100%;
  }

  .table-responsive {
    overflow-x: auto;
  }

  .table td:nth-child(1):not([colspan]),
  .table th:nth-child(1):not([colspan]) {
    display: none;
  }
  .draggable-handle {
      cursor: move;
    }
    .dragging {
      background-color: #ffeeba !important;
    }

  .kosten-section {
  border: 1px solid #dee2e6;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  background-color: #fdfdfd;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.section-header {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ccc;
  padding-bottom: 0.3rem;
}

}

/* ============================
   Druckansicht
============================ */
@media print {
  .button-grid,
  select,
  label,
  .neue-position-btn {
    display: none !important;
  }

  body {
    padding: 0;
  }
}
