:root {
  /* TopHold variables */
  --th-primary: #4db5ff;
  --th-primary-rgb: 77, 181, 255;

  --th-primary-light: #8accff;
  --th-primary-light-rgb: 138, 204, 255;

  --th-primary-dark: #3786be;
  --th-primary-dark-rgb: 55, 134, 190;

  --th-space-1: .25rem;
  --th-space-2: .5rem;
  --th-space-3: 1rem;
  --th-space-4: 1.5rem;
  --th-space-5: 3rem;

  --th-font-size-s: .875rem;
  --th-font-size-xs: .75rem;

  --th-font-weight-semibold: 600;

  --th-navbar-bottom-height: 4rem;
  --th-icon-size: 1em;

  --th-head-font-family: Quicksand, Inter, Manrope, Barlow, system-ui, -apple-system, sans-serif;

  /* Bootstrap overrides */
  --bs-body-font-family: system-ui, -apple-system, sans-serif;
  --bs-heading-color: var(--bs-gray-800);
  --bs-primary: var(--th-primary);
  --bs-primary-rgb: var(--th-primary-rgb);
  --bs-secondary: var(--bs-gray-600);
  --bs-secondary-rgb: 108, 117, 125;

  --bs-gray: #6c757d;
  --bs-gray-dark: #343a40;
  --bs-gray-100: #f8f9fa;
  --bs-gray-200: #e9ecef;
  --bs-gray-300: #dee2e6;
  --bs-gray-400: #ced4da;
  --bs-gray-500: #adb5bd;
  --bs-gray-600: #6c757d;
  --bs-gray-700: #495057;
  --bs-gray-800: #343a40;
  --bs-gray-900: #212529;

  --bs-code-color: var(--bs-gray-800);
  --bs-link-color: var(--th-primary);
  --bs-link-color-rgb: var(--th-primary-rgb);
  --bs-link-hover-color: var(--th-primary-dark);
  --bs-link-hover-color-rgb: var(--th-primary-dark-rgb);
}

/* Bootstrap overrides */
.btn-primary {
  --bs-btn-font-weight: var(--th-font-weight-semibold);
  --bs-btn-bg: rgba(var(--th-primary-rgb), 1);
  --bs-btn-border-color: var(--bs-btn-bg);
  --bs-btn-hover-bg: rgba(var(--th-primary-light-rgb), 1);
  --bs-btn-hover-border-color: var(--bs-btn-hover-bg);
  --bs-btn-active-bg: rgba(var(--th-primary-dark-rgb), 1);
  --bs-btn-active-border-color: var(--bs-btn-active-bg);
}

.card {
  --bs-secondary: var(--bs-gray-500);
  --bs-secondary-rgb: 173, 181, 189;

  --bs-card-cap-padding-y: .75rem;
  --bs-card-title-color: var(--bs-gray-300);
  --bs-card-subtitle-color: var(--bs-secondary);
  --bs-card-color: rgba(var(--bs-light-rgb), 1);
  --bs-card-bg: rgba(var(--bs-dark-rgb), 1);
  --bs-card-border-width: 0;
  --bs-card-border-radius: var(--bs-border-radius-lg);
}

.card a {
  text-decoration: none;
  font-weight: var(--th-font-weight-semibold);
}

.card .list-group {
  --bs-list-group-color: var(--bs-card-color);
  --bs-list-group-bg: var(--bs-card-bg);
  --bs-list-group-border-color: var(--bs-gray-800);
}

.card.boulder {
  --bs-card-title-spacer-y: 0;
  --th-img-height: 12rem;
}

.card.boulder.with-difficulty picture {
  --th-dot-size: 2rem;
  --th-dot-bg: transparent;

  position: relative;
}

.card.boulder.with-difficulty picture::after {
  content: "";
  display: block;
  position: absolute;
  z-index: 1;
  bottom: calc((var(--th-dot-size) / 3) * -1);
  right: calc(var(--th-dot-size) / 2);
  width: var(--th-dot-size);
  height: var(--th-dot-size);
  background-color: var(--th-dot-bg);
  border: 1px solid var(--bs-card-color);
  border-radius: 50%;
}

/* Headings */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-family: var(--th-head-font-family);
  font-weight: var(--th-font-weight-semibold);
}

h1 {
  color: var(--th-primary);
  margin-bottom: var(--th-space-3);
}

h2 {
  color: var(--bs-secondary);
  margin-bottom: var(--th-space-3);
}

/* Validation for static identity pages */
.form-control.invalid {
  border-color: var(--bs-form-invalid-border-color);
  padding-right: calc(1.5em + .75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(.375em + .1875rem) center;
  background-size: calc(.75em + .375rem) calc(.75em + .375rem);
}

.form-control.invalid ~ .invalid-feedback {
  display: block;
}

/* Quicksand font */
@font-face {
  font-display: swap;
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 300;
  src: url('/fonts/quicksand-v37-latin-300.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 400;
  src: url('/fonts/quicksand-v37-latin-regular.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 500;
  src: url('/fonts/quicksand-v37-latin-500.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 600;
  src: url('/fonts/quicksand-v37-latin-600.woff2') format('woff2');
}

@font-face {
  font-display: swap;
  font-family: 'Quicksand';
  font-style: normal;
  font-weight: 700;
  src: url('/fonts/quicksand-v37-latin-700.woff2') format('woff2');
}

/* Blazor error UI */
#blazor-error-ui {
  color-scheme: light only;
  background: lightyellow;
  bottom: 0;
  box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
  display: none;
  left: 0;
  padding: 0.6rem 1.25rem 0.7rem 1.25rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
}

#blazor-error-ui .dismiss {
  cursor: pointer;
  position: absolute;
  right: 0.75rem;
  top: 0.5rem;
}

/* App-wide styles */
html, body {
  height: 100%;
}

::-moz-focus-inner {
  padding: 0;
  border-style: none;
}

:focus {
  outline: none;
}
