/* REDESIGN 2026 design tokens - shared source of truth for the whole site.
   game-report.php and lineup.php currently also hand-copy this same block
   locally (own :root); the duplicate definitions are harmless (identical
   values), but any page that does NOT define its own copy - i.e. every page
   loading only this shared stylesheet - now gets the real brand tokens
   (navy #03228f, not Bootstrap's default blue #0d6efd) automatically. */
:root {
    --hr-navy: #03228f; --hr-navy-deep: #021a6b; --hr-sky: #00aeef;
    --hr-ink: #172033; --hr-muted: #5d6b82; --hr-line: #d9dfe8;
    --hr-bg: #f3f5f9; --hr-surface: #ffffff; --hr-surface-2: #f8f9fc;
    --hr-goal: #1f7a4d; --hr-goal-soft: #e3f3ea; --hr-penalty: #b3261e; --hr-penalty-soft: #fbe9e7;
    --hr-warn: #8a5a00; --hr-warn-soft: #fff4d6; --hr-live: #0a7d3a;
}

/* Bootstrap primary utilities/components remapped to the brand navy instead of
   Bootstrap's default blue - matches the convention already established in
   game-report.php / lineup.php. */
.btn-primary { --bs-btn-bg: var(--hr-navy); --bs-btn-border-color: var(--hr-navy); --bs-btn-hover-bg: var(--hr-navy-deep); --bs-btn-hover-border-color: var(--hr-navy-deep); --bs-btn-active-bg: var(--hr-navy-deep); }
.btn-outline-primary { --bs-btn-color: var(--hr-navy); --bs-btn-border-color: var(--hr-navy); --bs-btn-hover-bg: var(--hr-navy); --bs-btn-hover-border-color: var(--hr-navy); --bs-btn-active-bg: var(--hr-navy); }
.bg-primary { background-color: var(--hr-navy) !important; }
.text-primary { color: var(--hr-navy) !important; }
.border-primary { border-color: var(--hr-navy) !important; }

/* Modal header: colored left accent bar instead of a filled colored header
   (the REDESIGN 2026 convention used by game-report.php's modals). Navy by
   default; add .is-success/.is-danger/.is-warning for a confirm/delete/warn
   modal's accent color. */
.modal-header { border-bottom: 1px solid var(--hr-line); padding: .9rem 1.1rem; align-items: flex-start; gap: .7rem; }
.modal-header::before { content: ''; width: 4px; align-self: stretch; border-radius: 2px; background: var(--hr-navy); flex: none; }
.modal-header.is-success::before { background: var(--hr-goal); }
.modal-header.is-danger::before { background: var(--hr-penalty); }
.modal-header.is-warning::before { background: var(--hr-warn); }

/* Status badges: soft-background pill instead of Bootstrap's solid fill -
   same semantic colors, matches the REDESIGN 2026 status-pill convention.
   Higher specificity than Bootstrap's companion .text-dark/.text-white so it
   wins regardless of which is listed second in the markup. */
.badge.bg-success { background-color: var(--hr-goal-soft) !important; color: var(--hr-goal) !important; font-weight: 600; }
.badge.bg-danger { background-color: var(--hr-penalty-soft) !important; color: var(--hr-penalty) !important; font-weight: 600; }
.badge.bg-warning { background-color: var(--hr-warn-soft) !important; color: var(--hr-warn) !important; font-weight: 600; }

/* Table headers inside cards: uppercase, muted label row - matches the
   REDESIGN 2026 table convention, applied without touching each page's markup. */
.card-body table thead th, .card-body .table thead th {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--hr-muted);
    font-weight: 600;
    background: var(--hr-surface-2);
    border-bottom: 1px solid var(--hr-line);
}

/* Page footer (php/footer.php).
   It is a normal element at the END of the document flow, not fixed: a fixed bar
   collided with every bottom-anchored element (sticky action bars, floating
   buttons, toasts) and hid content behind it. The body is a flex column with
   min-height 100vh, so on short pages the footer is still pushed to the bottom
   of the screen (margin-top:auto); on long pages it simply follows the content. */
body {
    font-size: .875rem;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.footer-note {
    margin-top: auto !important;   /* push to the bottom on short pages */
    flex-shrink: 0;
    width: 100%;
    background-color: #f8f9fa; /* Light grey background */
    padding: 10px 12px;
    /* keep the text above the iPhone home indicator */
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #dee2e6; /* Light grey border */
    font-size: .8rem;
    line-height: 1.4;
    color: #6c757d;
}
/* gap between the last piece of content and the footer (rendered by php/footer.php) */
.footer-spacer {
    flex-shrink: 0;
    height: 1.5rem;
}

.navbar-brand {
    padding: .75rem 1rem;
    font-size: 1.25rem;
}

.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
}

.sidebar .nav-link .feather {
    margin-right: 4px;
    color: #999;
}

.sidebar .nav-link.active {
    color: var(--hr-navy);
}

.sidebar .nav-link:hover .feather,
.sidebar .nav-link.active .feather {
    color: inherit;
}

.nav-link .feather {
    width: 16px;
    height: 16px;
    vertical-align: text-bottom;
}

.main-content {
    margin-left: 250px; /* Adjust based on sidebar width */
}

.card-header {
    background-color: var(--hr-navy);
    color: white;
}

/* Lepší viditelnost tlačítek v card-header */
.card-header .btn-group .btn-outline-primary {
    border-color: white;
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.card-header .btn-group .btn-outline-primary:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: white;
    color: white;
}

.card-header .btn-group .btn-outline-primary.active,
.card-header .btn-group .btn-check:checked + .btn-outline-primary {
    background-color: white;
    border-color: white;
    color: var(--hr-navy);
}

.card-header .btn-group .btn-outline-success {
    border-color: white;
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.card-header .btn-group .btn-outline-success:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: white;
    color: white;
}

.card-header .btn-group .btn-outline-success.active,
.card-header .btn-check:checked + .btn-outline-success {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.card-header .btn-outline-secondary {
    border-color: white;
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.card-header .btn-outline-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: white;
    color: white;
}

/* Live indikátor */
.card-header .live-indicator {
    color: #28a745 !important;
    font-weight: bold;
}

.card-body {
    background-color: #f8f9fa;
}

/* Calendar styles */
.legend-item {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 8px 12px;
    background-color: #f8f9fa;
    margin-bottom: 8px;
}

.team-color-swatch {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    border: 1px solid rgba(0,0,0,0.2);
}

.team-checks {
    display: flex;
    gap: 12px;
    margin-left: 24px;
}

.team-checks .form-check {
    margin-bottom: 0;
}

#calendar-toolbar {
    padding-bottom: 12px;
    border-bottom: 1px solid #dee2e6;
}

#legend {
    min-height: 60px;
}

#view-switch .btn {
    border-radius: 0;
}

#view-switch .btn:first-child {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

#view-switch .btn:last-child {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}

/* FullCalendar overrides */
.fc-event {
    border-radius: 4px !important;
    font-size: 0.8rem !important;
}

.fc-event-title {
    font-weight: 500 !important;
    padding: 2px 4px !important;
}

.fc-timegrid-event {
    border-radius: 4px !important;
}

/* Split-color booking events */
.fc-event.booking-event {
    background: linear-gradient(90deg, var(--home-color, #007bff) 0%, var(--home-color, #007bff) 50%, var(--away-color, #28a745) 50%, var(--away-color, #28a745) 100%) !important;
    border: 1px solid rgba(0,0,0,0.2) !important;
}

.fc-event.booking-event .fc-event-title {
    text-shadow: 1px 1px 1px rgba(0,0,0,0.3) !important;
    color: white !important;
    font-weight: bold !important;
}
