.ub-toolbar-btn {
    font-size: 1rem !important;
    height: 48px !important;
    min-width: 120px;
    padding: 0 2.2rem !important;
    border-radius: 0.5rem !important;
    font-weight: 600 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: none;
    margin-right: 0.5rem;
    margin-left: 0.5rem;
    transition: background 0.2s, color 0.2s;
}

/* Make runners and segments table font smaller */
#runnersTable td,
#runnersTable th,
.table-segments td,
.table-segments th {
    font-size: 0.90rem;
    padding-left: 0.35em;
    padding-right: 0.35em;
}

/* Center segments table headers vertically and horizontally */
.table-segments th {
    vertical-align: middle !important;
}

/* Make segments table columns narrower */
.table-segments th:nth-child(1),
.table-segments td:nth-child(1) {
    min-width: 24px;
    width: 24px;
}

.table-segments th:nth-child(2),
.table-segments td:nth-child(2) {
    min-width: 70px;
    max-width: 500px;
}

.table-segments th:nth-child(3),
.table-segments td:nth-child(3) {
    min-width: 130px;
    width: 130px;
    text-align: center;
}

.table-segments th:nth-child(4),
.table-segments td:nth-child(4) {
    min-width: 40px;
    width: 90px;
}

.ub-toolbar-btn-info {
    background: #516085 !important;
    color: #fff !important;
}

.ub-toolbar-btn-green {
    background: #6C758A !important;
    color: #fff !important;
}

.ub-toolbar-btn-blue {
    background: #6C758A !important;
    color: #fff !important;
}

.ub-toolbar-btn-orange {
    background: #516085 !important;
    color: #fff !important;
}

.ub-toolbar-btn-red {
    background: #141C3C !important;
    color: #fff !important;
}

.ub-toolbar-btn:disabled,
.ub-toolbar-btn[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}

:root {
    --bs-primary: #1A1F3C;
    --bs-secondary: #6C758A;
    --bs-body-bg: #fff;
    --bs-body-color: #222;
    --bs-font-sans-serif: 'Montserrat', Arial, 'Helvetica Neue', sans-serif;
}

body {
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    font-family: var(--bs-font-sans-serif);
}

.ub-header {
    background: #00ff33;
    color: #fff;
    padding: 1rem 0 1rem 0;
    margin-bottom: 1rem;
}

.ub-logo {
    height: 48px;
    margin-right: 1rem;
    vertical-align: middle;
}

.ub-title {
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 1px;
    vertical-align: middle;
}

.ub-card {
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ub-btn-generate {
    background: #1A1F3C;
    color: #fff;
    font-size: 1rem;
    padding: 0.4rem 2rem;
    border: none;
    border-radius: 0.5rem;
    margin: 0 auto 0 auto;
    display: block;
    transition: background 0.2s;
    opacity: 100% !important;
}

.ub-btn-generate:hover {
    background: #BFB0AD;
    color: #fff;
}

.table-segments {
    max-height: none;
    overflow-y: visible;
    display: block;
}

.ub-schedule {
    min-height: 80px;
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-top: 1rem;
    color: #222;
    font-size: 1.1rem;
}

#runnersTable td,
#runnersTable th,
.table-segments td,
.table-segments th {
    font-size: 0.82rem;
}

.tips-sidebar {
  position: fixed;
  top: 90px;
  left: 0;
  width: 220px;
  background: #fff3e0;
  border-right: 2px solid #000000;
  padding: 1rem 1rem 1rem 1rem;
  z-index: 1100;
  overflow-y: auto;
  font-size: 1.07rem;
  border-radius: 0px 10px 10px 0px;
}
.tips-sidebar h4 {
  margin-bottom: 1.2rem;
  color: #141C3C;
}
.tips-sidebar ul {
  list-style: none;
  padding-left: 0;
}
.tips-sidebar li {
  margin-bottom: 1.1em;
}
.tips-sidebar ul li a {
  color: #141C3C;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}
.tips-sidebar ul li a:hover {
  color: #BFB0AD;
  text-decoration: none;
}
@media (max-width: 900px) {
  .tips-sidebar {
    position: static;
    width: 100%;
    height: auto;
    border-right: none;
    border-radius: 0;
  }
}
.tips-main-content {
  margin-left: 240px;
  transition: margin 0.2s;
}
@media (max-width: 900px) {
  .tips-main-content {
    margin-left: 0;
  }
}
.tips-sidebar {
  background: #f9f6f2;
  border-right: 1px solid #e3e3e3;
}
.tips-sidebar h4 {
  color: #a67c52;
}
.tips-sidebar ul li a {
  color: #a67c52;
}
.tips-sidebar ul li a:hover {
  color: #BFB0AD;
}
.tips-sidebar {
  background: #fff;
  border-right: 1px solid #222;
  border-top: 1px solid #222;
  border-bottom: 1px solid #222;
  color: #222;
}
.tips-sidebar h4 {
  color: #DEB181;
}
.tips-sidebar ul li a {
  color: #141C3C;
  font-weight: 700;
}
.tips-sidebar ul li a:hover {
  color: #BFB0AD;
  text-decoration: none;
}
.tips-section {
  margin-bottom: 2.5rem !important;
  padding-bottom: 2rem;
  border-bottom: 1.5px solid #ececec;
}
.tips-section:last-of-type {
  border-bottom: none;
}
@media (max-width: 900px) {
  .tips-sidebar {
    position: static;
    width: 100%;
    height: auto;
    border-right: none;
    border-radius: 0;
    margin-bottom: 1rem;
    padding: 1rem 0.5rem;
  }
  .tips-main-content {
    margin-left: 0;
    max-width: 100vw;
    padding: 0 0.5rem;
  }
  .ub-card {
    margin-bottom: 1rem;
    box-shadow: none;
  }
  .tips-section {
    margin-bottom: 1.2rem !important;
    padding-bottom: 1rem;
  }
  .tips-howtoget-list li {
    margin-bottom: 1em;
    padding-bottom: 0.3em;
  }
  header.ub-header {
    padding: 0.7rem 1vw !important;
  }
}
@media (max-width: 600px) {
  .tips-sidebar {
    font-size: 1rem;
    padding: 0.7rem 0.3rem;
  }
  .tips-main-content {
    padding: 0 0.2rem;
  }
  .ub-card {
    margin-bottom: 0.7rem;
  }
  .tips-section {
    margin-bottom: 0.7rem !important;
    padding-bottom: 0.5rem;
  }
}
@media (max-width: 600px) {
  .ub-header > div {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.5rem;
  }
  .ub-title {
    font-size: 1.3rem !important;
    margin-bottom: 0.3rem;
  }
  .ub-toolbar-btn {
    font-size: 0.95rem !important;
    padding: 0.4em 0.8em !important;
    min-width: 90px !important;
    margin: 0 !important;
  }
  .ub-header a[style*="position:absolute"] {
    position: static !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    margin-top: 0.3rem;
  }
}
.tips-howtoget-list iframe {
  max-width: 100%;
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}
@media (max-width: 600px) {
  .ub-header > div {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0;
  }
  .ub-title {
    font-size: 1.1rem !important;
    margin-bottom: 0 !important;
    margin-right: 0.7rem !important;
    white-space: nowrap;
    flex: 1 1 auto;
  }
  .ub-toolbar-btn {
    font-size: 0.92rem !important;
    padding: 0.3em 0.7em !important;
    min-width: 70px !important;
    margin: 0 !important;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 0 0 auto;
  }
  .ub-header a[style*="position:absolute"] {
    position: static !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    margin-top: 0;
    margin-left: auto;
  }
}
.ub-header-flex {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.ub-header-flex .ub-title {
  margin: 0 auto;
  text-align: center;
  flex: 1 1 auto;
}
.ub-header-flex .ub-toolbar-btn {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}
@media (max-width: 600px) {
  .ub-header-flex {
    min-height: 56px;
  }
  .ub-header-flex .ub-title {
    font-size: 1.1rem !important;
    margin: 0 auto;
    flex: 1 1 auto;
  }
  .ub-header-flex .ub-toolbar-btn {
    font-size: 0.92rem !important;
    padding: 0.3em 0.7em !important;
    min-width: 70px !important;
    max-width: 90px;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
  }
}
@media (max-width: 600px) {
  .ub-header-flex {
    justify-content: center !important;
    position: relative;
  }
  .ub-header-flex .ub-title {
    margin: 0 auto !important;
    text-align: center !important;
    left: 0; right: 0;
    position: relative;
    width: 100%;
    flex: 0 1 auto;
  }
  .ub-header-flex .ub-toolbar-btn {
    position: absolute !important;
    right: 0.5rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    max-width: 90px;
    font-size: 0.92rem !important;
    padding: 0.3em 0.7em !important;
    min-width: 70px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 0 0 auto;
  }
}
@media (max-width: 600px) {
  .ub-header-flex {
    position: relative !important;
    min-height: 56px;
  }
  .ub-header-flex .ub-title {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    text-align: center !important;
    width: max-content;
    font-size: 1.1rem !important;
    z-index: 2;
  }
  .ub-header-flex .ub-toolbar-btn {
    position: absolute !important;
    right: 0.5rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    max-width: 90px;
    font-size: 0.92rem !important;
    padding: 0.3em 0.7em !important;
    min-width: 70px !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    z-index: 3;
  }
}
@media (min-width: 601px) {
  .ub-header-flex .ub-toolbar-btn {
    min-width: 120px !important;
    max-width: 220px !important;
    width: auto !important;
    font-size: 1.1rem !important;
    padding: 0.5em 1.2em !important;
  }

  .ub-toolbar-btn {
    max-width: 620px !important;
  }
}

.ub-header-flex .ub-toolbar-btn {
  white-space: normal !important;
  word-break: break-word !important;
  max-width: 260px !important;
}
@media (min-width: 601px) {
  .ub-header-flex {
    position: relative !important;
  }
  .ub-header-flex .ub-toolbar-btn {
    position: absolute !important;
    right: 0.7rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    min-width: 120px !important;
    max-width: 220px !important;
    width: auto !important;
    font-size: 1.1rem !important;
    padding: 0.5em 1.2em !important;
    white-space: nowrap !important;
    word-break: normal !important;
  }
  .ub-header-flex .ub-title {
    position: relative !important;
    margin: 0 auto !important;
    text-align: center !important;
    left: 0; right: 0;
    width: 100%;
    font-size: 1.7rem !important;
    z-index: 2;
  }
}
@media (max-width: 900px) {
  .tips-sidebar {
    text-align: center;
    margin-bottom: 1.5rem;
    justify-content: center;
    align-items: center;
  }
  .tips-sidebar ul {
    display: inline-block;
    text-align: left;
    margin: 0 auto;
  }
}
@media (max-width: 900px) {
  .tips-sidebar nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
  }
}

.scrollToTopBtn:hover {
  background: #fff;
  color: #141C3C;
  opacity: 1;
}
@media (min-width: 901px) {
  #scrollToTopBtnTips {
    display: none !important;
  }
}

.scrollToTopBtn {
  position: fixed;
  right: 3vw;
  bottom: 3vw;
  z-index: 1200;
  background: #141C3C;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 64px;
  height: 64px;
  font-size: 2rem;
  box-shadow: 0 2px 8px #0003;
  cursor: pointer;
  display: block;
  opacity: 0 !important;
  transform: translateY(30px) !important;
  transition: background 0.2s, opacity 0.3s, transform 0.3s !important;
}
.scrollToTopBtn.show {
  opacity: 0.85 !important;
  transform: translateY(0) !important;
}

#scrollToTopBtn {
  right: 1vw;
  bottom: 70px;
}

.bg-primary {
    background-color: #1A1F3C !important;
}