/* Global typography */
body {
  font-family: "Optima", "Candara", "Noto Sans", "source-sans-pro", sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Optima", "Candara", "Noto Sans", "source-sans-pro", sans-serif;
  font-weight: 500; /* Medium weight for headings */
}

/* Additional typography enhancements */
.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  font-weight: 600; /* Semi-bold weight for prose headings */
  color: #023047; /* Dark blue from our palette */
}

/* carousel styling */

.custom-animated-handle {
  transition: transform 0.2s;
}

.slider-with-animated-handle:hover .custom-animated-handle {
  transform: scale(1.2);
}

/* Basic styling for carousel container and items */
.carousel {
  display: flex;
  /* Ensure slides are in a row */
  transition: transform 0.3s ease;
  /* Smooth slide transition */
}

.carousel-item {
  flex: 0 0 auto;
  /* Prevent items from growing */
  width: 100%;
  /* Ensure items take full width of parent */
}

/* Navigation buttons */
.carousel-prev-btn,
.carousel-next-btn {
  transition: opacity 0.3s ease;
  /* Smooth opacity transition */
}

/* Overlay for navigation buttons */
.carousel-prev-btn:hover,
.carousel-next-btn:hover {
  opacity: 100;
  /* Show buttons on hover */
}

/* Pagination container */
.pagination {
  text-align: center;
  list-style: none;
  padding: 0;
}

/* Individual page links */
.pagination li {
  display: inline-block;
  margin: 0 5px;
}

.pagination li a {
  padding: 8px 16px;
  background-color: #f5f5f5;
  color: #333;
  text-decoration: none;
  border-radius: 5px;
  border: 1px solid #ddd;
  transition: background-color 0.3s, color 0.3s;
}

/* Hover and active states */
.pagination li a:hover,
.pagination li.active a {
  background-color: #219ebc; /* Our blue color */
  color: #ffffff;
  border-color: #219ebc;
}

/* Assuming a 'disabled' class for li elements for disabled links */
.pagination li.disabled a {
  background-color: #e9e9e9;
  color: #777;
  border: 1px solid #ddd;
  pointer-events: none;
}

.table-container {
  margin-bottom: 1rem;
}

.details-content p {
  white-space: pre-wrap; /* Allows text to wrap */
  word-break: break-word; /* Breaks long words */
}

/* Style for even rows - using very light Madras teal */
tr:nth-child(even) {
  background-color: #edf7f6; /* secondary-50 - very light teal */
}

/* Indicator */
/* Progress bar */
.progress {
  height: 4px;
  width: 100%;
  border-radius: 2px;
  background-clip: padding-box;
  overflow: hidden;
  position: relative;
}

.progress {
  opacity: 0;
}

.htmx-request .progress {
  opacity: 1;
}
.htmx-request.progress {
  opacity: 1;
}

.progress .indeterminate {
  background-color: #219ebc; /* Our blue color */
}

.progress .indeterminate:before {
  content: "";
  position: absolute;
  background-color: inherit;
  top: 0;
  left: 0;
  bottom: 0;
  will-change: left, right;
  -webkit-animation: indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395)
    infinite;
  animation: indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
}
.progress .indeterminate:after {
  content: "";
  position: absolute;
  background-color: inherit;
  top: 0;
  left: 0;
  bottom: 0;
  will-change: left, right;
  -webkit-animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1)
    infinite;
  animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1)
    infinite;
  -webkit-animation-delay: 1.15s;
  animation-delay: 1.15s;
}

@keyframes indeterminate {
  0% {
    left: -35%;
    right: 100%;
  }
  60% {
    left: 100%;
    right: -90%;
  }
  100% {
    left: 100%;
    right: -90%;
  }
}

@keyframes indeterminate-short {
  0% {
    left: -200%;
    right: 100%;
  }
  60% {
    left: 107%;
    right: -8%;
  }
  100% {
    left: 107%;
    right: -8%;
  }
}

/* YouTube embed fix */
/* Requires WAGTAILEMBEDS_RESPONSIVE_HTML = True */
/* https://docs.wagtail.org/en/stable/topics/writing_templates.html */
.responsive-object {
  position: relative;
}

.responsive-object iframe,
.responsive-object object,
.responsive-object embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* We're using Tailwind's animate-bounce class instead */

/* Prose styling for dark backgrounds */
.prose-invert {
  color: white;
}

.prose-invert p {
  color: rgba(255, 255, 255, 0.9);
  margin-top: 0.75em;
  margin-bottom: 0.75em;
}
