html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  margin-bottom: 60px;
  overflow-x: hidden;
  max-width: 100%;
}

main {
  padding-bottom: 80px;
}

.container-fluid {
  padding-bottom: 20px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Fix the ugly "Remove item" button and improve Choices.js style */

.choices__list--multiple .choices__item {
  background-color: #e9ecef;
  color: #212529;
  border-radius: 2rem;
  border: 1px solid #ced4da;
  padding: 0.25em 2em 0.25em 1em;
  margin-bottom: 4px;
  font-size: 0.95em;
  position: relative;
}

.choices__list--multiple .choices__item .choices__button {
  position: absolute;
  right: 0.5em;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #dc3545;
  font-weight: bold;
  font-size: 1.2em;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
}
.choices__list--multiple .choices__item .choices__button:after {
  content: '✕';
}
.choices__list--multiple .choices__item .choices__button[aria-label]:before {
  content: '';
}
.choices__list--multiple .choices__item .choices__button {
  width: 1.4em;
  height: 1.4em;
}

/* Hide the text "Remove item" (for accessibility, set aria-label only) */
.choices__list--multiple .choices__item .choices__button[aria-label] {
  text-indent: -9999px;
}

/* Always show max width of container */
.choices__inner .choices__input,
.choices__input--cloned {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box;
}

#participants-table {
  font-size: 0.98em;   /* Slightly smaller font */
  background: #fff;
  border-radius: 9px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  overflow: hidden;
}
#participants-table thead th {
  background: #eaf1fb;
  color: #222;
  font-weight: 600;
  border-bottom: 2px solid #d3d3d3;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  padding-left: 10px !important;
  padding-right: 10px !important;
  font-size: 0.96em;
}
#participants-table tbody td {
  padding-top: 4px !important;
  padding-bottom: 4px !important;
  padding-left: 7px !important;
  padding-right: 7px !important;
  vertical-align: middle;
  border-color: #e4e9ef;
}
#participants-table tbody tr {
  background: #fafdff;
  border-bottom: 1px solid #e4e9ef;
  transition: background 0.2s;
}
#participants-table tbody tr:hover {
  background: #e9f2ff !important;
}

/* Action buttons: spacing and hover effect */
#participants-table .btn {
  padding: 2px 7px;
  font-size: 0.96em;
  margin-right: 2px;
  border-radius: 5px;
  box-shadow: none;
  transition: background 0.1s;
}
#participants-table .btn-outline-primary:hover,
#participants-table .btn-outline-danger:hover,
#participants-table .btn-outline-success:hover,
#participants-table .btn-outline-secondary:hover {
  background: #eaf1fb;
}
/* Caret icon size */
#participants-table i.bi {
  font-size: 1.1em;
  vertical-align: middle;
}

/* Expanded row cell matches table border */
#participants-table tr > td.bg-light {
  background: #f7fafc !important;
  border-bottom: 1px solid #e4e9ef !important;
  padding: 10px 14px 8px 18px;
}

/* Remove extra space above/below expanded rows */
.activity-details-wrapper {
  margin-top: 0px;
  margin-bottom: 0px;
}

.activity-details-wrapper {
  background: #f7fafc;
  border-left: 4px solid #007bff;
  border-radius: 8px;
  padding: 6px 10px 4px 14px;  /* less padding */
  margin-top: 8px;
  margin-bottom: 8px;
  font-size: 0.97em;           /* smaller font */
}
.activity-detail-table {
  font-size: 0.92em;           /* smaller table font */
  margin-bottom: 0;
}
.activity-detail-table th,
.activity-detail-table td {
  padding-top: 2px !important;
  padding-bottom: 2px !important;
  padding-left: 6px !important;
  padding-right: 6px !important;
}
.activity-detail-table thead th {
  background: #e9ecef !important;
}
.activity-detail-table tfoot td {
  background: #f5f5f5 !important;
}
/* Optional: Make sum row bolder */
.activity-detail-table tfoot tr.fw-bold {
  font-size: 1em;
}

.highlighted-participant {
  background-color: #fff3cd !important; /* soft yellow highlight */
  transition: background-color 0.5s ease;
  animation: pulseHighlight 1.5s ease-in-out;
}

@keyframes pulseHighlight {
  0% { background-color: #fff3cd; }
  50% { background-color: #ffe8a1; }
  100% { background-color: #fff3cd; }
}
