@charset "UTF-8";
:root {
  --bs-body-font-family: "Roboto", sans-serif;
  --ct-body-color: #6c757d;
  --bs-body-bg: #f5f7fa;
  --bs-primary-rgb: 50, 93, 136;
  --bs-border-radius: 12px;

  .pigeon-search {
    --bs-border-color: var(--bs-primary-border-subtle);
  }

  .table {
    --bs-table-striped-bg: #fff;
  }

  .card {
    --bs-card-cap-bg: #fff;
    --bs-card-bg: #fff;
    -webkit-box-shadow: 0px 5px 30px 0px rgb(0, 0, 0, 0.25);
    box-shadow: 0px 5px 30px 0px rgb(0, 0, 0, 0.25);
  }

  .dropdown-menu {
    --bs-dropdown-link-active-bg: #565e64;
    --bs-dropdown-link-hover-bg: #565e64;
    --bs-dropdown-link-hover-color: #fff;
  }

  .infobar {
    background-color: #f5f7fa;
    border-bottom: var(--bs-card-border-width) solid var(--bs-card-border-color);
    border-top: var(--bs-card-border-width) solid var(--bs-card-border-color);
  }

  @media print {
    .infobar {
      background-color: transparent !important;
    }
  }

  .hscroll {
    overflow-x: auto;
  }

  a {
    text-decoration: none;
  }

  .breadcrumb {
    font-weight: bold;
    font-style: italic;
    text-transform: uppercase;
    --bs-link-color-rgb: 50, 93, 136;
  }
}

[data-bs-theme="dark"] {
  --bs-primary-rgb: 50, 93, 136;
  --bs-body-color: #fff;
  --bs-body-bg: #2d353c;
}

.footer {
  text-align: center;
}

.ace-tabs {
  font-size: 1.1em;
  border-bottom: 2px solid #dee2e6;
  gap: 0.25rem;

  .nav-link {
    border: 2px solid transparent;
    border-radius: 8px 8px 0 0;
    padding: 0.75rem 1.25rem;
    color: #6c757d;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    background-color: #f8f9fa;
    margin-bottom: -2px;

    &:hover {
      color: var(--bs-primary);
      background-color: #e9ecef;
      border-color: #dee2e6;
      border-bottom-color: transparent;
    }

    &.active {
      color: var(--bs-primary);
      background-color: white;
      border-color: #dee2e6;
      border-bottom-color: white;
      font-weight: 600;
      box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
    }
  }
}

.imarker {
  margin-top: 3px;
  border-left: 5px solid #428bca;
}

.explainIcons {
  list-style-type: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 0;
  align-items: center;

  li {
    display: inline;
    margin: 0 5px;
  }
}

.options {
  display: flex;
  flex-wrap: wrap;
  justify-content: centerc;
  div {
    margin: 3px;
  }
}

.loginscreen {
  background: url(/img/loginscreen.jpg) no-repeat center center fixed;
  background-size: cover;
  height: 100vh;
  padding-top: 30vh;
}

.loginform {
  border-radius: 15px;
  padding: 25px;
  width: 380px;
  margin: 0 auto;
  background-color: #fff;
  -webkit-box-shadow: 0px 5px 30px 0px rgb(148 146 245 / 25%);
  box-shadow: 0px 30px 30px 0px rgb(0 0 0 / 25%);

  input {
    font-size: 1.8em;
    line-height: 2em;
  }
}

.flex-between-center {
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.flex-between-start {
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -webkit-box-align: start;
  -ms-flex-align: start;
  align-items: start;
}

.cgold {
  color: #ffe621;
}
.csilver {
  color: #c0c0c0;
}
.cbronze {
  color: #cd7f32;
}

.navbar .fa-solid {
  font-size: 1.2em;
  width: 25px;
}

.content {
  padding-top: 20px;

  h1 {
    color: rgb(50, 93, 136);
    font-style: italic;
    font-size: clamp(1.4rem, 2.4vw, 2.4rem);
  }
}

.card {
  h2 {
    color: rgb(50, 93, 136);
    font-style: italic;
    font-size: 1.3rem;
  }
}

.latest-arrivals {
  td {
    background-color: var(--bs-card-bg);
    padding-left: 25px;
  }
}

.latest-posts {
  padding-top: 10px;
  li {
    a {
      strong {
        line-height: 1.2;
      }
    }

    small {
      margin: 0.25rem 5px;

      i {
        opacity: 0.7;
      }
    }

    &:last-child {
      border-bottom: none !important;
      padding-bottom: 0 !important;
      margin-bottom: 0 !important;
    }
  }
}

.page-header small {
  display: block;
  margin-top: 5px;
}

.table .progress {
  height: 15px;
  border: 1px solid #ddd;
  width: 100px;
}

.timeline {
  position: relative;
  padding: 0;
}

.timeline::before {
  border-left: 1px dashed;
  height: 100%;
  left: 3px;
  top: 0;
  opacity: 0.48;
}

.timeline::after,
.timeline::before {
  content: "";
  position: absolute;
}

.timeline-current::before {
  height: calc(100% - 2.11rem);
  top: 40%;
}

.timeline .icon {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  left: -10px;
  top: 40%;
  width: 26px;
  height: 26px;
  background-color: var(--bs-gray-200);
  border-radius: 50%;
}

.table thead tr th {
  vertical-align: middle;
}

.table tbody tr td {
  vertical-align: middle;
}

table thead th {
  cursor: pointer;
  white-space: nowrap;
  outline-style: none;
}

table thead th.points {
  font-size: 0.7em;
}

table thead th small {
  display: block;
  font-size: 1.1em;
}

table.table-sorted thead th {
  padding-right: 12px;
}

table.table-sorted
  thead
  th:not(.headerSortUp):not(.headerSortDown):not(.no-sort) {
  background: url(/img/arrows.png) no-repeat 98% center;
}

.table-results th,
.table-results td,
.table-nighttimes th,
.table-nighttimes td {
  text-align: center;
  white-space: nowrap;
}

.table-distances td {
  text-align: right;
  width: 9%;
}

table caption {
  padding-bottom: 5px;
  text-align: left;
  line-height: 10px;
}

table td.tleft,
table th.tleft,
.tleft {
  text-align: left;
  padding-left: 7px;
}

table td.tright,
table th.tright,
.tright {
  text-align: right;
  padding-right: 7px;
}

table td.tspeed {
  text-align: right;
  padding-right: 7px;
}

table td.tcenter,
table th.tcenter,
.tcenter {
  text-align: center;
}

div.resultoptions {
  display: block;
  width: 500px;
}

.pigeoninfo dt {
  width: 100px;
}

.pigeoninfo dd {
  margin-left: 110px;
}

.alert {
  margin-top: 15px;
  margin-bottom: 3px;
  font-size: 1.1em;
}

.yes {
  color: #0a0;
}

.no {
  color: #f00;
}

.text-partial {
  color: #ffac1c;
}

.caption-dark {
  padding: 10px;
  background-color: #343a40;
  color: #fff;
  font-size: 1.2em;
}

a.resultIcons {
  text-decoration: none;
  font-size: 16px;
}

.text-success {
  color: #0a0;
}

.text-muted {
  color: #aaa;
}

.sms {
  color: #ce4844;
}

#liveSpeed h3 {
  margin: 0;
}

#liveSpeed strong {
  font-size: 1.2em;
}

#raceInfo {
  clear: both;
}

#raceMap {
  width: 100%;
  height: 300px;
  margin-top: 5px;
  border-radius: var(--bs-border-radius);
}

#raceButtons {
  margin-bottom: 3px;
}

.menuOptions {
  margin-bottom: 3px;
}

.bs-callout {
  padding: 20px;
  margin: 20px 0;
  border: 1px solid #eee;
  border-left-width: 5px;
  border-radius: 3px;
}

.bs-callout h4 {
  margin-top: 0;
  margin-bottom: 5px;
}

.bs-callout p:last-child {
  margin-bottom: 0;
}

.bs-callout code {
  border-radius: 3px;
}

.bs-callout + .bs-callout {
  margin-top: -5px;
}

.bs-callout-default {
  border-left-color: #777;
}

.bs-callout-default h4 {
  color: #777;
}

.bs-callout-primary {
  border-left-color: #428bca;
}

.bs-callout-primary h4 {
  color: #428bca;
}

.bs-callout-success {
  border-left-color: #5cb85c;
}

.bs-callout-success h4 {
  color: #5cb85c;
}

.bs-callout-danger {
  border-left-color: #d9534f;
}

.bs-callout-danger h4 {
  color: #d9534f;
}

.bs-callout-warning {
  border-left-color: #f0ad4e;
}

.bs-callout-warning h4 {
  color: #f0ad4e;
}

.bs-callout-info {
  border-left-color: #5bc0de;
}

.bs-callout-info h4 {
  color: #5bc0de;
}

/* Table sorting styles */
.table-sorted thead th:not(.no-sort) {
  user-select: none;
  position: relative;
  padding-right: 25px;
  cursor: pointer;
}

.table-sorted thead th:not(.no-sort):hover {
  background-color: var(--bs-table-hover-bg);
}

.table-sorted thead th.headerSortUp::after,
.table-sorted thead th.headerSortDown::after {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.75em;
  opacity: 0.7;
}

.table-sorted thead th.headerSortUp::after {
  content: "\f0de"; /* fa-sort-up */
}

.table-sorted thead th.headerSortDown::after {
  content: "\f0dd"; /* fa-sort-down */
}

@media print {
  .container {
    width: auto;
  }

  a[href]:after {
    content: none !important;
  }
}

/* Ringlist Styles */
.section-block {
  border-left: 4px solid #0d6efd;
  padding-left: 1rem;
}

.section-block.direct-members {
  border-left-color: #198754;
  background-color: #f8f9fa;
  padding: 1rem;
  border-radius: 0.5rem;
}

.section-title {
  color: #0d6efd;
  font-weight: 600;
  font-size: 1.5rem;
  border-bottom: 2px solid #e9ecef;
  padding-bottom: 0.5rem;
}

.direct-members .section-title {
  color: #198754;
}

.group-block {
  margin-left: 1rem;
  padding: 1rem;
  background-color: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 0.375rem;
}

.group-title {
  color: #495057;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.ringlistmembers {
  font-size: 1rem;
}

.ringlistmembers thead th {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 1rem;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #dee2e6;
}

.ringlistmembers tbody tr:hover {
  background-color: #f8f9fa !important;
}

.ring-series {
  font-family: "Courier New", monospace;
  line-height: 1.8;
}

.ring-range {
  display: inline-block;
  white-space: nowrap;
}

.ring-prefix {
  color: #6c757d;
}

.ring-number {
  font-weight: 600;
  color: #212529;
}

/* Ringlist Print Styles */
@media print {
  /* Reset and base styles */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body {
    margin: 0;
    padding: 0;
    font-size: 9pt;
    line-height: 1.3;
    width: 100%;
    background-color: white !important;
  }

  /* Hide non-printable elements for ringlist */
  .btn,
  .nav-tabs,
  .breadcrumb,
  .input-group,
  .infobar,
  header,
  footer,
  .card-header .col-auto:last-child {
    display: none !important;
  }

  /* Card and layout adjustments */
  .card {
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    width: 100%;
  }

  .card-body {
    padding: 0 !important;
    width: 100%;
  }

  .card-header {
    border: none !important;
    padding: 0 0 10pt 0 !important;
    background: none !important;
    width: 100%;
  }

  .card-header h1 {
    font-size: 16pt;
    margin: 0 0 3pt 0 !important;
    color: #000 !important;
  }

  .card-header p {
    font-size: 9pt;
    margin: 0 !important;
  }

  /* Container adjustments */
  .container,
  .container-fluid,
  .row,
  .col-lg-12 {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #ringlist {
    width: 100%;
  }

  /* Print header on every page */
  @page {
    margin: 1cm 1cm 1.5cm 1cm;
    size: A4 portrait;

    @bottom-right {
      content: "Side " counter(page) " av " counter(pages);
      font-size: 8pt;
      color: #666;
    }
  }

  /* Section blocks */
  .section-block {
    page-break-inside: avoid;
    page-break-after: auto;
    border-left: 2pt solid #000 !important;
    padding-left: 6pt !important;
    margin-bottom: 12pt !important;
    background: none !important;
    width: 100%;
  }

  .section-block.direct-members {
    border-left-color: #666 !important;
    background: none !important;
    padding: 6pt !important;
  }

  .section-title {
    font-size: 13pt;
    font-weight: bold;
    color: #000 !important;
    border-bottom: 1pt solid #333 !important;
    padding-bottom: 3pt !important;
    margin-bottom: 6pt !important;
    page-break-after: avoid;
  }

  .section-title i {
    display: none;
  }

  /* Group blocks */
  .group-block {
    page-break-inside: avoid;
    margin-left: 6pt !important;
    padding: 6pt !important;
    margin-bottom: 8pt !important;
    background: none !important;
    border: 1pt solid #ccc !important;
    border-radius: 0 !important;
    width: calc(100% - 12pt);
  }

  .group-title {
    font-size: 11pt;
    font-weight: bold;
    color: #000 !important;
    margin-bottom: 4pt !important;
    page-break-after: avoid;
  }

  .group-title i {
    display: none;
  }

  /* Tables */
  .table-responsive {
    overflow: visible !important;
    width: 100%;
  }

  .ringlistmembers {
    width: 100% !important;
    max-width: 100% !important;
    border-collapse: collapse;
    font-size: 8pt;
    margin-bottom: 4pt !important;
    table-layout: fixed;
  }

  .ringlistmembers thead {
    display: table-header-group;
  }

  .ringlistmembers thead th {
    background: #e0e0e0 !important;
    color: #000 !important;
    border: 1pt solid #999 !important;
    padding: 3pt 4pt !important;
    font-weight: bold;
    font-size: 8pt;
    text-transform: uppercase;
    letter-spacing: 0;
  }

  /* Adjust column widths for full page */
  .ringlistmembers thead th:nth-child(1) {
    width: 22%;
  }
  .ringlistmembers thead th:nth-child(2) {
    width: 32%;
  }
  .ringlistmembers thead th:nth-child(3) {
    width: 24%;
  }
  .ringlistmembers thead th:nth-child(4) {
    width: 12%;
  }
  .ringlistmembers thead th:nth-child(5) {
    width: 10%;
  }

  /* Direct members table (4 columns) */
  .direct-members .ringlistmembers thead th:nth-child(1) {
    width: 25%;
  }
  .direct-members .ringlistmembers thead th:nth-child(2) {
    width: 35%;
  }
  .direct-members .ringlistmembers thead th:nth-child(3) {
    width: 25%;
  }
  .direct-members .ringlistmembers thead th:nth-child(4) {
    width: 15%;
  }

  .ringlistmembers tbody {
    display: table-row-group;
  }

  .ringlistmembers tbody tr {
    page-break-inside: avoid;
    page-break-after: auto;
    background: none !important;
  }

  .ringlistmembers tbody tr:nth-child(even) {
    background: #f9f9f9 !important;
  }

  .ringlistmembers tbody td {
    border: 1pt solid #ddd !important;
    padding: 3pt 4pt !important;
    vertical-align: top;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Ring series styling */
  .ring-series {
    font-family: "Courier New", Courier, monospace;
    font-size: 7.5pt;
    line-height: 1.4;
  }

  .ring-range {
    display: block;
    white-space: nowrap;
    margin-bottom: 1pt;
  }

  .ring-prefix {
    color: #666 !important;
  }

  .ring-number {
    font-weight: bold;
    color: #000 !important;
  }

  .ring-range i {
    font-size: 6pt;
  }

  /* Info paragraphs */
  .small {
    font-size: 7pt !important;
    margin: 0 !important;
  }

  .small i {
    display: none;
  }

  /* Direct members table */
  .table-primary th {
    background: #d0d0d0 !important;
    color: #000 !important;
  }

  /* Ensure text is black */
  strong,
  td,
  th,
  p {
    color: #000 !important;
  }

  /* Hide filtered rows */
  tbody tr[style*="display: none"] {
    display: none !important;
  }
}

/* Leaflet Fullscreen Control */
.leaflet-control-fullscreen a {
  background-color: #fff;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.leaflet-control-fullscreen a:hover {
  background-color: #f4f4f4;
  color: var(--bs-primary);
}

#fullscreenMap {
  width: 100%;
}

/* Custom Leaflet Icons */
.custom-loft-icon,
.custom-station-icon {
  background: transparent !important;
  border: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
}
