/* Yoga Webapp Custom Styles */

:root {
  --yoga-primary: #655f4c;
  --yoga-primary-rgb: 101, 95, 76;
  --yoga-secondary: #6c757d;
  --yoga-success: #198754;
  --yoga-info: #0dcaf0;
  --yoga-warning: #ffc107;
  --yoga-danger: #dc3545;
  --yoga-light: #f8f9fa;
  --yoga-dark: #212529;
  --yoga-border: #e9ecef;
  --yoga-shadow: rgba(0,0,0,0.15);
}

/* Global Styles */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--yoga-light);
}

/* Gradient Background for Login */
.bg-gradient {
  background: linear-gradient(135deg, var(--yoga-primary) 0%, #764ba2 100%);
  min-height: 100vh;
}

/* Card Enhancements */
.card {
  border-radius: 15px;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--yoga-shadow) !important;
}

/* Button Enhancements */
.btn {
  border-radius: 10px;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-lg {
  padding: 12px 24px;
  font-size: 1.1rem;
}

/* Override Bootstrap button colors */
.btn-primary {
  background-color: var(--yoga-primary) !important;
  border-color: var(--yoga-primary) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--yoga-primary) !important;
  border-color: var(--yoga-primary) !important;
  opacity: 0.9;
}

.btn-success {
  background-color: var(--yoga-primary) !important;
  border-color: var(--yoga-primary) !important;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active {
  background-color: var(--yoga-primary) !important;
  border-color: var(--yoga-primary) !important;
  opacity: 0.9;
}

.btn-outline-primary {
  color: var(--yoga-primary) !important;
  border-color: var(--yoga-primary) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background-color: var(--yoga-primary) !important;
  border-color: var(--yoga-primary) !important;
  color: white !important;
}

.btn-outline-success {
  color: var(--yoga-primary) !important;
  border-color: var(--yoga-primary) !important;
}

.btn-outline-success:hover,
.btn-outline-success:focus,
.btn-outline-success:active {
  background-color: var(--yoga-primary) !important;
  border-color: var(--yoga-primary) !important;
  color: white !important;
}

.btn-outline-danger {
  color: var(--yoga-danger) !important;
  border-color: var(--yoga-danger) !important;
}

.btn-outline-danger:hover,
.btn-outline-danger:focus,
.btn-outline-danger:active {
  background-color: var(--yoga-danger) !important;
  border-color: var(--yoga-danger) !important;
  color: white !important;
}

/* Form Enhancements */
.form-control {
  border-radius: 10px;
  border: 2px solid var(--yoga-border);
  transition: all 0.2s ease-in-out;
}

.form-control:focus {
  border-color: var(--yoga-primary);
  box-shadow: 0 0 0 0.2rem rgba(var(--yoga-primary-rgb), 0.25);
}

.form-control-lg {
  padding: 12px 16px;
  font-size: 1.1rem;
}

/* Alert Enhancements */
.alert {
  border-radius: 10px;
  border: none;
  font-weight: 500;
}

/* Navbar Enhancements */
.navbar-brand {
  font-weight: 600;
  font-size: 1.3rem;
}

/* Override Bootstrap navbar colors */
.navbar.bg-primary {
  background-color: var(--yoga-primary) !important;
}

.navbar-dark .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.85);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
  color: rgba(255, 255, 255, 1);
}

.navbar-dark .navbar-nav .nav-link.active {
  color: rgba(255, 255, 255, 1);
  font-weight: 600;
}

/* Stats Cards */
.card-body h2 {
  font-weight: 700;
  margin: 0.5rem 0;
}

/* Icon Enhancements */
.bi {
  vertical-align: -0.125em;
}

/* Loading States */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .container-fluid {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  .card-body {
    padding: 1.5rem !important;
  }
  
  .display-1 {
    font-size: 3rem;
  }
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Custom Utilities */
.text-yoga-primary {
  color: var(--yoga-primary) !important;
}

.bg-yoga-primary {
  background-color: var(--yoga-primary) !important;
}

.border-yoga-primary {
  border-color: var(--yoga-primary) !important;
}

/* Override Bootstrap utility classes */
.bg-primary {
  background-color: var(--yoga-primary) !important;
}

.bg-success {
  background-color: var(--yoga-primary) !important;
}

.bg-danger {
  background-color: var(--yoga-danger) !important;
}

.bg-warning {
  background-color: var(--yoga-warning) !important;
}

.bg-info {
  background-color: var(--yoga-info) !important;
}

.bg-light {
  background-color: var(--yoga-light) !important;
}

.bg-dark {
  background-color: var(--yoga-dark) !important;
}

.text-primary {
  color: var(--yoga-primary) !important;
}

.text-success {
  color: var(--yoga-success) !important;
}

.text-danger {
  color: var(--yoga-danger) !important;
}

.text-warning {
  color: var(--yoga-warning) !important;
}

.text-info {
  color: var(--yoga-info) !important;
}

/* Footer */
footer {
  margin-top: auto;
}

/* Login Page Specific */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Dashboard Specific */
.dashboard-header {
  background: linear-gradient(135deg, var(--yoga-primary) 0%, #764ba2 100%);
  border-radius: 15px;
}

/* Quick Actions */
.btn-outline-primary:hover,
.btn-outline-success:hover,
.btn-outline-info:hover,
.btn-outline-warning:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--yoga-shadow);
}

/* Disabled State */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn:disabled:hover {
  transform: none;
}

/* Table Row Interactions */
.table-row-clickable {
  transition: background-color 0.2s ease;
}

.table-row-clickable:hover {
  background-color: var(--yoga-light) !important;
}

.table-row-clickable:active {
  background-color: var(--yoga-border) !important;
}

/* Status Bar */
.status-bar {
  box-shadow: 0 -2px 15px var(--yoga-shadow);
  border-top: 1px solid rgba(255,255,255,0.1);
}

.status-bar.show {
  transform: translateY(0) !important;
}

/* Add bottom padding to main content when status bar is shown */
body.status-bar-visible {
  padding-bottom: 60px;
}

/* Subtle status bar styling */
.status-bar {
  font-size: 0.9rem;
  font-weight: 400;
}

.status-bar .btn-close {
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.status-bar .btn-close:hover {
  opacity: 1;
}

/* Kurs Item Active State */
.kurs-item {
  position: relative;
  transition: all 0.2s ease-in-out;
}

.kurs-item.active {
  background-color: transparent !important;
  border-left: 4px solid var(--yoga-primary) !important;
  border-top: 1px solid var(--yoga-border) !important;
  border-bottom: 1px solid var(--yoga-border) !important;
  border-right: 1px solid var(--yoga-border) !important;
  margin-left: 0 !important;
  padding-left: 1rem !important;
  color: var(--yoga-dark) !important;
  position: relative;
  z-index: 1;
}

.kurs-item.active h5,
.kurs-item.active h6,
.kurs-item.active .text-muted {
  color: var(--yoga-dark) !important;
}

.kurs-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: var(--yoga-primary);
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 8px rgba(var(--yoga-primary-rgb), 0.3);
  z-index: 2;
}

/* Bootstrap list-group-item-action überschreiben für aktive Kurse */
.kurs-item.active:focus,
.kurs-item.active:active,
.kurs-item.active:hover {
  background-color: transparent !important;
  border-left: 4px solid var(--yoga-primary) !important;
  border-top: 1px solid var(--yoga-border) !important;
  border-bottom: 1px solid var(--yoga-border) !important;
  border-right: 1px solid var(--yoga-border) !important;
  color: var(--yoga-dark) !important;
  margin-left: 0 !important;
  padding-left: 1rem !important;
}

/* Spezifische Überschreibung für Bootstrap's list-group-item-action - höchste Priorität */
.list-group .list-group-item-action.kurs-item.active {
  background-color: transparent !important;
  border-left: 4px solid var(--yoga-primary) !important;
  border-top: 1px solid var(--yoga-border) !important;
  border-bottom: 1px solid var(--yoga-border) !important;
  border-right: 1px solid var(--yoga-border) !important;
  color: var(--yoga-dark) !important;
  position: relative !important;
  z-index: 10 !important;
  margin-left: 0 !important;
  padding-left: 1rem !important;
}

.list-group .list-group-item-action.kurs-item.active:focus,
.list-group .list-group-item-action.kurs-item.active:active,
.list-group .list-group-item-action.kurs-item.active:hover,
.list-group .list-group-item-action.kurs-item.active:focus-visible {
  background-color: transparent !important;
  border-left: 4px solid var(--yoga-primary) !important;
  border-top: 1px solid var(--yoga-border) !important;
  border-bottom: 1px solid var(--yoga-border) !important;
  border-right: 1px solid var(--yoga-border) !important;
  color: var(--yoga-dark) !important;
  box-shadow: none !important;
  margin-left: 0 !important;
  padding-left: 1rem !important;
}

/* Zusätzliche Überschreibung für Bootstrap's aktive States */
.list-group-item-action.kurs-item.active {
  background-color: transparent !important;
  border-left: 4px solid var(--yoga-primary) !important;
  border-top: 1px solid var(--yoga-border) !important;
  border-bottom: 1px solid var(--yoga-border) !important;
  border-right: 1px solid var(--yoga-border) !important;
  color: var(--yoga-dark) !important;
  margin-left: 0 !important;
  padding-left: 1rem !important;
}

/* Hover effect for kurs items */
.kurs-item:hover:not(.active) {
  background-color: rgba(var(--yoga-primary-rgb), 0.05) !important;
  transform: translateX(2px);
}

/* Termin item active styling */
.termin-item.active {
  background-color: transparent !important;
  border-left: 4px solid var(--yoga-primary) !important;
  border-top: 1px solid var(--yoga-border) !important;
  border-bottom: 1px solid var(--yoga-border) !important;
  border-right: 1px solid var(--yoga-border) !important;
  position: relative;
  z-index: 1;
  color: var(--yoga-dark) !important;
}

.termin-item.active h5,
.termin-item.active h6,
.termin-item.active .text-muted {
  color: var(--yoga-dark) !important;
}

.termin-item.active::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: var(--yoga-primary);
  z-index: 2;
}

/* Hover effect for termin items */
.termin-item:hover:not(.active) {
  background-color: rgba(var(--yoga-primary-rgb), 0.05) !important;
  transform: translateX(2px);
}

/* Person item active styling - einheitlich mit termin-item */
.person-item.active {
  background-color: transparent !important;
  border-left: 4px solid var(--yoga-primary) !important;
  border-top: 1px solid var(--yoga-border) !important;
  border-bottom: 1px solid var(--yoga-border) !important;
  border-right: 1px solid var(--yoga-border) !important;
  position: relative;
  z-index: 1;
  color: var(--yoga-dark) !important;
}

.person-item.active h5,
.person-item.active h6,
.person-item.active .text-muted {
  color: var(--yoga-dark) !important;
}

.person-item.active::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: var(--yoga-primary);
  z-index: 2;
}

/* Hover effect for person items */
.person-item:hover:not(.active) {
  background-color: rgba(var(--yoga-primary-rgb), 0.05) !important;
  transform: translateX(2px);
}

/* Legacy: Active row styling for personen table (falls noch verwendet) */
.person-row.table-active {
  background-color: rgba(var(--yoga-primary-rgb), 0.1) !important;
  border-left: 4px solid var(--yoga-primary) !important;
}

.person-row.table-active td {
  border-color: var(--yoga-primary) !important;
}

/* Kalender View-Button Active Styling */
.view-btn.active {
  background-color: var(--yoga-primary) !important;
  border-color: var(--yoga-primary) !important;
  color: white !important;
}

.view-btn.active:hover {
  background-color: var(--yoga-primary) !important;
  border-color: var(--yoga-primary) !important;
  opacity: 0.9;
}

/* Kurs-Link Styling für Status-Seite */
.kurs-link {
  color: var(--yoga-primary);
  transition: color 0.2s ease;
  text-decoration: none;
}

.kurs-link:hover {
  color: var(--yoga-primary);
  opacity: 0.8;
  text-decoration: none;
}

.kurs-link i {
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.kurs-link:hover i {
  opacity: 1;
}

/* KRITISCHE ÜBERSCHREIBUNG: Bootstrap list-group-item-action für aktive Kurse - höchste Priorität */
.list-group-item-action.kurs-item.active,
.list-group-item-action.kurs-item.active:focus,
.list-group-item-action.kurs-item.active:active,
.list-group-item-action.kurs-item.active:hover,
.list-group-item-action.kurs-item.active:focus-visible {
  background-color: transparent !important;
  border-left: 4px solid var(--yoga-primary) !important;
  border-top: 1px solid var(--yoga-border) !important;
  border-bottom: 1px solid var(--yoga-border) !important;
  border-right: 1px solid var(--yoga-border) !important;
  color: var(--yoga-dark) !important;
  box-shadow: none !important;
  position: relative !important;
  z-index: 999 !important;
  margin-left: 0 !important;
  padding-left: 1rem !important;
}

/* Zusätzliche Sicherheit für alle möglichen Bootstrap-Selektoren */
.list-group .list-group-item-action.kurs-item.active,
.list-group .list-group-item-action.kurs-item.active:focus,
.list-group .list-group-item-action.kurs-item.active:active,
.list-group .list-group-item-action.kurs-item.active:hover {
  background-color: transparent !important;
  border-left: 4px solid var(--yoga-primary) !important;
  border-top: 1px solid var(--yoga-border) !important;
  border-bottom: 1px solid var(--yoga-border) !important;
  border-right: 1px solid var(--yoga-border) !important;
  color: var(--yoga-dark) !important;
  box-shadow: none !important;
  margin-left: 0 !important;
  padding-left: 1rem !important;
}
