/* ===================================================================
 * SPRINT KANOE WEB SCRAPER - BLACK & WHITE MINIMALIST STYLESHEET
 * Pure Black & White design matching sprint.kanoe.cz architecture
 * =================================================================== */

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #ffffff;
  color: #000000;
  padding-top: 4.5rem;
  padding-bottom: 3rem;
  min-height: 100vh;
}

/* --- BLACK NAVBAR --- */
.bg-kanoe-dark {
  background-color: #000000 !important;
  border-bottom: 2px solid #000000;
}

.navbar-brand {
  font-weight: 700;
  color: #ffffff !important;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}

.navbar-brand img {
  height: 34px;
  width: auto;
  filter: brightness(0) invert(1);
}

.bg-kanoe-dark .nav-link {
  color: #e0e0e0 !important;
  font-weight: 500;
  padding: 0.5rem 0.9rem !important;
}

.bg-kanoe-dark .nav-item.active .nav-link,
.bg-kanoe-dark .nav-link:hover {
  color: #ffffff !important;
  font-weight: 700;
  text-decoration: underline;
}

/* --- FILTER CONTAINERS & BOXES --- */
.bg-light-bw {
  background-color: #f8f9fa !important;
  border: 1px solid #000000 !important;
  border-radius: 4px;
}

.border-bw {
  border: 1px solid #000000 !important;
}

.form-control-bw {
  border: 1px solid #000000;
  border-radius: 3px;
  font-size: 0.9rem;
  padding: 0.45rem 0.75rem;
}

.form-control-bw:focus {
  border-color: #000000;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.2);
}

/* --- BLACK & WHITE BUTTONS --- */
.btn-dark-bw {
  background-color: #000000;
  color: #ffffff;
  border: 1px solid #000000;
  font-weight: 600;
  border-radius: 3px;
  padding: 0.45rem 1rem;
  transition: background-color 0.15s ease;
}

.btn-dark-bw:hover {
  background-color: #333333;
  color: #ffffff;
}

.btn-outline-dark-bw {
  background-color: #ffffff;
  color: #000000;
  border: 1px solid #000000;
  font-weight: 600;
  border-radius: 3px;
  padding: 0.45rem 1rem;
  transition: all 0.15s ease;
}

.btn-outline-dark-bw:hover {
  background-color: #000000;
  color: #ffffff;
}

/* --- TABLES (BLACK & WHITE) --- */
.table-competitions, .table-results {
  width: 100%;
  border-collapse: collapse;
}

.table-competitions thead th, .table-results thead th {
  background-color: #000000;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  border: 1px solid #000000;
  padding: 0.75rem 0.9rem;
}

.table-competitions tbody tr, .table-results tbody tr {
  border-bottom: 1px solid #cccccc;
}

.table-competitions tbody tr:hover, .table-results tbody tr:hover {
  background-color: #f1f1f1 !important;
  cursor: pointer;
}

.table-competitions td, .table-results td {
  padding: 0.75rem 0.9rem;
  vertical-align: middle;
  font-size: 0.9rem;
  border: 1px solid #e0e0e0;
}

.comp-title-link {
  color: #000000;
  font-weight: 700;
  text-decoration: underline;
}

.comp-title-link:hover {
  color: #555555;
}

/* --- EXACT RACE RESULT MODAL STYLING (FROM SPRINT.KANOE.CZ) --- */
.modal-competition-detail .modal-content,
.modal-race-result .modal-content {
  border: 1px solid #000000;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  overflow: hidden;
}

.modal-competition-detail .modal-dialog {
  max-width: 1180px;
  width: calc(100vw - 2rem);
}

.modal-competition-detail .modal-body {
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
}

.modal-race-result .modal-header {
  background-color: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  padding: 0.85rem 1.25rem;
}

.modal-competition-detail .modal-header {
  border-bottom: 1px solid #1f1f1f;
  padding: 0.95rem 1.2rem;
}

.modal-race-result .results-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #000000;
  margin: 0.5rem 0 1.25rem 0;
}

.modal-race-result .results-title i {
  color: #10b981;
}

.modal-race-result .race-sub-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 1rem;
}

.modal-race-result .race-info-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #000000;
  line-height: 1.3;
}

.modal-race-result .race-info-phase {
  color: #dc2626;
  font-weight: 600;
}

.modal-race-result .action-btn-group {
  display: inline-flex;
  gap: 6px;
}

.modal-race-result .action-btn-group .btn {
  font-size: 0.825rem;
  font-weight: 600;
  border: 1px solid #cccccc;
  background-color: #ffffff;
  color: #000000;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
}

.modal-race-result .action-btn-group .btn:hover {
  background-color: #f0f0f0;
  border-color: #000000;
}

.competition-modal-inner {
  padding: 1rem;
}

.modal-section {
  border-radius: 4px;
}

.modal-result-row {
  gap: 0.75rem;
}

/* Standings Table inside Modal */
.table-race-standings {
  width: 100%;
  margin-top: 0.75rem;
  border-collapse: separate;
  border-spacing: 0 4px;
}

.table-race-standings tr {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  transition: background-color 0.15s ease;
}

.table-race-standings tr:nth-child(even) {
  background-color: #f9fafb;
}

.table-race-standings tr:hover {
  background-color: #f3f4f6;
}

.table-race-standings td {
  padding: 0.65rem 0.85rem;
  vertical-align: middle;
  font-size: 0.925rem;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.table-race-standings td:first-child {
  border-left: 1px solid #e5e7eb;
  font-weight: 700;
  text-align: center;
  width: 45px;
}

.table-race-standings td:last-child {
  border-right: 1px solid #e5e7eb;
  text-align: right;

}

.athlete-name {
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
}

.athlete-name:hover {
  text-decoration: underline;
}

.athlete-club {
  font-weight: 700;
  color: #000000;
}

.flag-img {
  width: 24px;
  height: auto;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.lane-num {
  font-weight: 700;
  color: #374151;
}

.time-val {
  font-weight: 700;
  font-size: 0.95rem;
  color: #000000;
}

.time-diff {
  font-size: 0.75rem;
  color: #6b7280;
}

.badge-qual {
  font-weight: 700;
  font-size: 0.78rem;
  color: #10b981;
}

/* --- BADGES & STATUS --- */
.badge-bw {
  background-color: #000000;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 3px 7px;
  border-radius: 2px;
}

.badge-outline-bw {
  background-color: #ffffff;
  color: #000000;
  border: 1px solid #000000;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 2px;
}

/* --- LOADERS --- */
.loader-bw {
  border: 3px solid #e0e0e0;
  border-top: 3px solid #000000;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* --- VIEW MANAGEMENT --- */
.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
}

/* --- FOOTER --- */
footer {
  margin-top: 3rem;
  text-align: center;
  color: #666666;
  font-size: 0.85rem;
  border-top: 1px solid #e0e0e0;
  padding-top: 1.5rem;
}

footer a {
  color: #000000;
  font-weight: 700;
  text-decoration: underline;
}

@media (max-width: 767.98px) {
  body {
    padding-top: 4rem;
  }

  .modal-competition-detail .modal-dialog,
  .modal-race-result .modal-dialog,
  .modal .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100vw - 1rem);
  }

  .modal-competition-detail .modal-body {
    max-height: calc(100vh - 7rem);
  }

  .competition-modal-inner {
    padding: 0.75rem;
  }

  .table-competitions thead th,
  .table-results thead th,
  .table-race-standings td {
    white-space: nowrap;
  }

  .modal-header .close {
    padding: 0.4rem 0.5rem;
    margin: -0.4rem -0.2rem -0.4rem auto;
  }
}
