/* Styling for UI components. Generally anything composed of multiple elements and multiple classes like navbars and modals. */

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
  display: flex;

  --icon-size: 24px;
  width: var(--icon-size);
  height: var(--icon-size);
  font-size: var(--icon-size);
}
.icon-lg {
  --icon-size: 32px;
}

.dropdown-menu {
  --bs-dropdown-link-active-color: var(--bs-body-bg);
  --bs-dropdown-link-active-bg: var(--bs-body-color);
  --bs-dropdown-link-hover-color: var(--bs-body-color);
  --bs-dropdown-link-hover-bg: var(--bg-light);
}
.dropdown-item {
  transition: background-color 0.2s ease-in-out;
  cursor: pointer;
}

.card-header {
  background: transparent;
  padding: var(--bs-card-spacer-y) var(--bs-card-spacer-x);
}

.nav-tabs .nav-link {
  color: var(--bs-body-color);
  --bs-nav-tabs-link-active-bg: transparent;
  transition: none;
  border: none;
  --bs-nav-link-padding-x: 2rem;
  --bs-nav-link-padding-y: 0.5rem;
}
.nav-tabs .nav-link.active {
  border-bottom: 4px solid var(--color-highlight) !important;
  margin-bottom: 0;
}

.badge { 
  transform: translateY(0.1em);
}
.badge-green {
  color: var(--bs-body-color);
  background: var(--color-brand-spring-green-light);
}
.badge-orange {
  color: var(--bs-body-color);
  background: #f5beaa;
}
.badge-yellow {
  color: var(--bs-body-color);
  background: #fce19c;
}
.badge-teal {
  color: var(--bs-body-color);
  background: #c2ece9;
}
.badge-gray {
  color: var(--bs-body-color);
  background: var(--color-brand-stone);
}
.badge-white {
  color: var(--bs-secondary-color);
  border: 1px solid var(--color-border-weak);
  background: var(--bs-body-bg);
}

.stoplight {
  width: 3em;
  height: 3em;
  aspect-ratio: 1;
  border-radius: 100%;
  border: 1px solid var(--color-border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
}
.stoplight-md {
  width: 2em;
  height: 2em;
}
.stoplight-sm {
  width: 1.5em;
  height: 1.5em;
}
.stoplight-xs {
  width: 1em;
  height: 1em;
}
.stoplight-red {
  background-color: var(--color-stoplight-red);
}
.stoplight-green {
  background-color: var(--color-stoplight-green);
}
.stoplight-yellow {
  background-color: var(--color-stoplight-yellow);
}
.stoplight-na,
.stoplight-does-not-apply {
  background-color: var(--color-stoplight-does-not-apply);
}
.stoplight-skipped {
  background-color: var(--color-stoplight-skipped);
}
/* Indicator question without an answer */
.stoplight-unanswered {
  border: none;
}
.stoplight-unanswered:after {
  content: "-";
}
/* Indicator answer with undefined state (useful for error feedback)  */
.stoplight-error:after {
  content: "?";
}

details .summary-expand-icon {
  display: inline-flex;
  transition: transform 0.2s ease-in-out;
  user-select: none;
  margin-left: -0.2em;
  transform: rotate(0deg) translateX(-0.1em) translateY(-0.05em);
}
details[open] .summary-expand-icon {
  transform: rotate(90deg) translateY(0.1em);
}

.spinner-border {
  color: var(--bs-primary);
}

/* ===== Invite Link Modal ===== */

.invite-modal-title {
  color: var(--color-brand-spring-green);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.invite-modal-label {
  font-weight: 700;
  font-size: 0.9375rem;
  margin-bottom: 0.375rem;
}

.invite-modal-hint {
  color: var(--bs-secondary-color);
  font-size: 0.84375rem;
  margin-top: -0.125rem;
  margin-bottom: 0.75rem;
}

/* Cap the modal body so it scrolls on short viewports without making the modal always full-height. */
#invite-link-modal .modal-body {
  overflow-y: auto;
  max-height: calc(100dvh - 14rem); /* 14rem ≈ dialog margins + header + footer */
}

/* Programs checkbox list */
.invite-check-list {
  border: 1px solid var(--color-border-strong);
  border-radius: 10px;
  padding: 4px;
  overflow: hidden;
}

.invite-check-item {
  display: flex;
  gap: 0.625rem;
  border-radius: 7px;
  padding: 0.625rem 0.875rem;
  transition: background 0.1s;
  cursor: pointer;
}

.invite-check-item:hover {
  background: var(--color-brand-stone);
}

/* Override Bootstrap's float-based form-check positioning */
.invite-check-item .form-check-input {
  float: none;
  flex-shrink: 0;
  margin-left: 0;
}

/* Slug unified border row */
.invite-slug-row {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--bs-border-radius);
  overflow: hidden;
  transition: border-color 0.12s, box-shadow 0.12s;
}

.invite-slug-row:focus-within {
  border-color: var(--color-brand-spring-green);
  box-shadow: 0 0 0 3px rgba(0, 170, 0, 0.18);
}

.invite-slug-row.has-error {
  border-color: var(--bs-danger);
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.12);
}

.invite-slug-prefix {
  display: inline-flex;
  align-items: center;
  padding: 0 0.875rem;
  background: var(--color-brand-stone);
  color: var(--bs-secondary-color);
  font-family: ui-monospace, monospace;
  font-size: 0.8125rem;
  border-right: 1px solid var(--color-border-weak);
  white-space: nowrap;
}

.invite-slug-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.6rem 0.75rem;
  font-family: ui-monospace, monospace;
  font-size: 0.9375rem;
  color: var(--bs-body-color);
  outline: none;
  min-width: 0;
}

.invite-slug-input::placeholder {
  color: var(--bs-secondary-color);
  opacity: 0.7;
}

/* Success state */
.invite-success-icon {
  width: 52px;
  height: 52px;
  background: var(--color-brand-spring-green-light);
  color: var(--color-brand-green-dark);
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 0.875rem;
}

/* Save notice: left-border accent */
.invite-save-notice {
  background: var(--color-brand-lemon-light);
  border-left: 3px solid var(--color-brand-lemon);
  border-radius: var(--bs-border-radius);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.invite-save-notice .material-symbols-outlined {
  flex: none;
  font-size: 18px;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

/* Link card */
.invite-link-card {
  background: var(--color-brand-stone);
  border: 1.5px dashed var(--color-border-weak) !important;
  border-radius: 10px;
  padding: 1rem 1.125rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

/* Summary rows */
.invite-summary-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.875rem;
  padding: 0.625rem 0;
  border-top: 1px solid var(--color-border-weak);
}

.invite-summary-key {
  color: var(--bs-secondary-color);
  width: 88px;
  flex: none;
  font-weight: 600;
}

.invite-summary-val {
  flex: 1;
}
