/* Custom Styles for Obozy Artystyczne - Bootstrap 5 Enhanced */

:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #0dcaf0;
  --light-color: #f8f9fa;
  --dark-color: #212529;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

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

.navbar-brand i {
  color: #ffc107;
}

/* Tables */
.table-responsive {
  border-radius: 0.375rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.table thead {
  background-color: var(--primary-color);
  color: white;
}

.table tbody tr:hover {
  background-color: rgba(13, 110, 253, 0.05);
}

/* Cards */
.card {
  border: none;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2) !important;
}

.card-header {
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
}

/* Forms */
.form-label {
  font-weight: 500;
  color: var(--dark-color);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-required::after {
  content: " *";
  color: var(--danger-color);
}

/* Buttons */
.btn {
  font-weight: 500;
  transition: all 0.2s;
  padding: 5px 15px;
}

.btn-lg {
  padding: 8px 20px;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

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

/* Alerts */
.alert {
  border: none;
  border-radius: 0.375rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Debug Output */
.debug-output {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  padding: 1rem;
  font-size: 0.875rem;
  overflow-x: auto;
}

/* Turnus Status */
.turnus-active {
  background-color: rgba(25, 135, 84, 0.1);
}

.turnus-inactive {
  background-color: rgba(108, 117, 125, 0.1);
}

/* Footer */
.footer {
  border-top: 1px solid #dee2e6;
}

/* Loading Spinner */
.spinner-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .navbar-brand {
    font-size: 1.25rem;
  }

  .table {
    font-size: 0.875rem;
  }

  .btn-sm-block {
    display: block;
    width: 100%;
    margin-bottom: 0.5rem;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .footer,
  .btn,
  .no-print {
    display: none !important;
  }

  .container-fluid {
    padding: 0;
  }
}

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

.fade-in {
  animation: fadeIn 0.3s ease-in;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--light-color);
}

::-webkit-scrollbar-thumb {
  background: var(--secondary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--dark-color);
}

/* Accessibility */
.visually-hidden-focusable:not(:focus):not(:focus-within) {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Focus Visible (for keyboard navigation) */
:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Compact Table Styles for Full Lists */
.table-sm {
  font-size: 0.85rem;
}

.table-sm td,
.table-sm th {
  padding: 0.4rem 0.5rem;
  vertical-align: middle;
}

.table-sm small {
  font-size: 0.8rem;
  display: block;
  line-height: 1.3;
}

.table-sm .badge {
  font-size: 0.7rem;
  padding: 0.25em 0.5em;
}

/* Sticky Header for Long Tables */
.table-responsive {
  max-height: 80vh;
  overflow-y: auto;
}

.table thead.sticky {
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Text wrapping control */
.text-nowrap {
  white-space: nowrap;
}

.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
  /* Można dodać dark mode jeśli potrzebne */
}
