/* Bootstrap Custom Styles für RaceApp - Schwarz/Grau/Weiß Design */

/* Container mit Sidebar */
@media (min-width: 992px) {
  .container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    margin-left: 250px;
    padding-left: 2rem;
    padding-right: 2rem;
  }

  /* Content Padding für Desktop */
  #main-content {
    padding-top: 3rem !important;
  }
}

/* Mobile Bottom Nav Spacing */
@media (max-width: 991px) {
  /* Globale mobile Einstellungen */
  html,
  body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
  }

  body {
    padding-top: 56px;
    padding-bottom: 60px;
  }

  /* Container auf volle Breite für Mobile */
  .container-fluid {
    max-width: 100%;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Content Padding für Mobile */
  #main-content {
    margin-top: 0;
    padding-top: 2rem;
    padding-bottom: 1rem;
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Navbar Container */
  .navbar > .container-fluid {
    max-width: 100%;
    width: 100%;
  }

  /* Navbar Brand anpassen für Mobile */
  .navbar-brand {
    font-size: 0.9rem;
  }

  .navbar-brand span {
    display: inline;
  }

  @media (max-width: 360px) {
    .navbar-brand span {
      display: none;
    }
  }

  /* Header und Footer fixed */
  .navbar.fixed-top,
  .navbar.fixed-bottom {
    width: 100%;
    max-width: 100%;
    left: 0;
    right: 0;
  }

  /* Bottom-Navigation kompakter */
  .navbar.fixed-bottom .container-fluid {
    padding-left: 0;
    padding-right: 0;
  }

  .navbar.fixed-bottom .bi {
    font-size: 1rem;
  }

  .navbar.fixed-bottom small {
    font-size: 0.65rem;
    line-height: 1;
    margin-top: 0.15rem;
  }

  .navbar.fixed-bottom a {
    padding: 0.5rem 0.25rem;
  }

  /* Buttons im Header */
  #backbuttonid,
  #newbuttonid {
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    white-space: nowrap;
  }

  /* Alle Rows und Cols begrenzen */
  .row {
    max-width: 100%;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
  }

  .row.g-0 {
    margin-left: 0;
    margin-right: 0;
  }

  [class*="col-"] {
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Alle weiteren Elemente begrenzen */
  .card,
  .list-group,
  .list-group-item,
  .alert,
  .form-control,
  .input-group {
    max-width: 100%;
  }
}

/* Navbar Active State */
.nav-link.active {
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 0.25rem;
}

/* Cards für Listen */
.list-card {
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.list-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Form Styles */
.form-label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #212529;
}

.form-control:focus,
.form-select:focus {
  border-color: #212529;
  box-shadow: 0 0 0 0.25rem rgba(33, 37, 41, 0.25);
}

/* Form Sections */
.card-body h5 {
  font-size: 1.1rem;
  font-weight: 600;
}

.card-body .border-bottom {
  border-color: #dee2e6 !important;
}

/* Form Spacing */
.card-body .mb-4:last-child {
  margin-bottom: 0 !important;
}

/* Textarea */
textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

/* Navbar Button Styles */
#backbuttonid,
#newbuttonid {
  cursor: pointer;
  padding: 0.5rem 1rem;
  transition: opacity 0.2s;
  white-space: nowrap;
}

#backbuttonid:hover,
#newbuttonid:hover {
  opacity: 0.8;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 0.25rem;
}

/* Plus-Button optisch dominanter */
#newbuttonid {
  font-weight: 600;
  font-size: 1.1rem;
  background-color: rgba(255, 255, 255, 0.15);
  border-radius: 0.375rem;
  padding: 0.5rem 1rem;
}

#newbuttonid:hover {
  background-color: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

#newbuttonid i {
  font-size: 1.2rem;
  margin-right: 0.25rem;
}

/* Button Styles */
.btn {
  border-radius: 0.375rem;
  font-weight: 500;
}

.btn-primary {
  background-color: #212529;
  border-color: #212529;
  color: #fff;
}

.btn-primary:hover {
  background-color: #000;
  border-color: #000;
  color: #fff;
}

.btn-outline-primary {
  color: #212529;
  border-color: #212529;
}

.btn-outline-primary:hover {
  background-color: #212529;
  border-color: #212529;
  color: #fff;
}

.btn-outline-secondary {
  color: #6c757d;
  border-color: #6c757d;
}

.btn-outline-secondary:hover {
  background-color: #6c757d;
  border-color: #6c757d;
  color: #fff;
}

/* Delete Button - dezenter grau statt knallig rot */
.btn-outline-danger {
  color: #6c757d;
  border-color: #adb5bd;
  background-color: transparent;
}

.btn-outline-danger:hover {
  background-color: #6c757d;
  border-color: #6c757d;
  color: #fff;
}

/* List Group Items */
.list-group-item {
  border-left: none;
  border-right: none;
  padding: 1rem;
}

.list-group-item:first-child {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.list-group-item:last-child {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* Badge Styles */
.badge {
  font-weight: 500;
  padding: 0.35em 0.65em;
}

/* Badges bleiben in ihren originalen Farben */

/* Loading Spinner */
.spinner-border {
  width: 3rem;
  height: 3rem;
}

.spinner-border.text-primary {
  color: #212529 !important;
}

/* Alert Styles */
.alert {
  border-radius: 0.5rem;
  border: 1px solid #dee2e6;
}

.alert-info {
  background-color: #f8f9fa;
  border-color: #6c757d;
  color: #212529;
}

/* Card Styles */
.card {
  border: 1px solid #dee2e6;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 0.5rem;
  background-color: #fff;
}

.card-header {
  background-color: #212529;
  color: #fff;
  border-bottom: 1px solid #212529;
  font-weight: 600;
}

/* Filter Input */
.form-control[type="search"] {
  border-radius: 2rem;
  padding-left: 2.5rem;
}

/* Mobile Bottom Nav Active State */
#navbar_hauptmenu a.active {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
}

/* Desktop Sidebar Active State */
#navbar_hauptmenu_desktop .nav-link.active {
  background-color: rgba(255, 255, 255, 0.15);
  border-left: 3px solid white;
}

/* Responsive Tables */
.table-responsive {
  border-radius: 0.5rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #6c757d;
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Field Contain Styler (für Kompatibilität) */
.fieldcontainfieldcontain_styler {
  margin-bottom: 1rem;
}

/* Center Wrapper */
.center-wrapper {
  text-align: center;
  padding: 1rem;
}

/* Datepicker Integration */
.datePicker {
  cursor: pointer;
}

/* Messi Modal Anpassungen */
.messi-content {
  border-radius: 0.5rem;
}

/* Globale Fixes gegen horizontales Scrollen */
html,
body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

/* Print Styles */
@media print {
  .navbar,
  #navbar_hauptmenu,
  #navbar_hauptmenu_desktop {
    display: none !important;
  }

  .container-fluid {
    margin-left: 0 !important;
  }
}
