
/* --------------------------------------------------------------------------------------- */
/* ---------------------- Django Message Banner Styling --------------------------- */

/* Softer green success alert */
.alert-success {
    background-color: #eaf7f0 !important;   /* Very soft mint green */
    border-color:     #d9f0e4 !important;   /* Soft border */
    color:            #2d6a4f !important;   /* Muted green text */
}


/* Make the alert close (X) button smaller and more subtle */
.alert .btn-close {
    width: 0.65rem !important;
    height: 0.65rem !important;
    background-size: 0.65rem !important;
    opacity: 0.6;
    margin-top: 2px;       /* fine-tune vertical alignment */
}

.alert .btn-close:hover {
    opacity: 1;
}



/* --------------------------------------------------------------------------------------- */
/* ----------------- Global Page Width, Header & Title Presets  -------------------- */

/* Base wrapper used on every page */
.page { margin: 0 auto; padding: 1rem; }

/* Width presets */
.page--narrow   { max-width: 900px; }     /* focused forms/wizards */
.page--standard { max-width: 1120px; }    /* most admin pages */
.page--wide     { max-width: none; }      /* data-heavy tables/dashboards */

/* Consistent headers */
.page-header { padding: 1rem 0 .75rem; margin: 0 0 1.25rem;
  border-bottom: 1px solid var(--border, #d0d7de); }
.page-title  { margin: 0; font-size: 2rem; font-weight: 700;
  color: var(--text-primary, var(--text-main)); }

/* Alignment variants (optional) */
.page-header--center { text-align: center; }
.page-header--left   { text-align: left; }




/* --------------------------------------------------------------------------------------- */
/* ------------------- Global search component --------------------- */

.search-wrap { position: relative; max-width: 720px; }
.search-input.form-control,
#participantSearch {
  font-size: 1.25rem;
  padding: .75rem 1rem;
}

.search-suggestions,
.results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  z-index: 1050;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #d0d7de);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(140,149,159,.2);
  max-height: 320px;
  overflow-y: auto;
  display: none; /* hidden by default */
}

.result-item, .search-suggestions .item {
  padding: .6rem .9rem;
  cursor: pointer;
  border-top: 1px solid var(--border, #e5e7eb);
}
.result-item:first-child { border-top: 0; }
.search-suggestions .item:last-child { border-bottom: 0; }

.result-name { font-size: 1.1rem; font-weight: 600; line-height: 1.2; }
.result-pps, .sub { font-size: .95rem; color: var(--text-muted, #57606a); }

.result-item:hover,
.result-item.active { background: #e9f2ff; }

.no-results { padding: .75rem .9rem; color: var(--text-muted, #6c757d); font-style: italic; }

.hl { background: #fff3cd; border-radius: .25rem; }


/* --------------------------------------------------------------------------------------- */


/* Teal Button */
.btn-teal {
  background-color: #2c7a7b;   /* CE-App teal */
  color: white;
  font-size: 0.85rem;
  padding: 0.35rem 0.8rem;
  border: none;
  border-radius: 0.25rem;
  transition: background-color 0.2s ease;
}

.btn-teal:hover {
  background-color: #3d9b9c;   /* darker teal on hover */
  color: #fff;

}

/* Optional larger version */
.btn-teal-large {
  font-size: 1rem;
  padding: 0.4rem 1rem;
}


/* Slate Button */
.btn-slate {
    background-color: #4a5568;
    color: white;
    font-size: 0.85rem;
    padding: 0.35rem 0.9rem;
    border: none;
    border-radius: 0.25rem;
    margin-left: 0.5rem;
    text-decoration: none;
    display: inline-block;
    line-height: 1.5;
    transition: background-color 0.2s ease;
}

.btn-slate:hover {
    background-color: #2d3748;
    text-decoration: none;
}



/* ---------------------------- Django Messages ------------------------------ */


/* Gentle fade + lift for Bootstrap alerts */
:root { --alert-fade-ms: 400ms; }

.alert.fade {
  opacity: 0;
  transform: translateY(-4px);
  transition:
    opacity var(--alert-fade-ms) ease,
    transform var(--alert-fade-ms) ease,
    box-shadow var(--alert-fade-ms) ease;
}

/* When .show is applied (Bootstrap), glide into place */
.alert.fade.show {
  opacity: 1;
  transform: translateY(0);
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

/* Slightly more compact alerts (optional) */
.alert.alert-compact { padding-top: .4rem; padding-bottom: .4rem; }

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .alert.fade,
  .alert.fade.show {
    transition: none;
    transform: none;
  }
}


/* Keep compact alerts tidy: space for close button + center it */
.alert.alert-compact.alert-dismissible {
  position: relative;
  padding-right: 2rem;               /* room for the X */
}

.alert.alert-compact.alert-dismissible .btn-close {
  position: absolute;
  top: 50%;
  right: .5rem;
  transform: translateY(-50%);       /* vertically center */
  padding: 0;                        /* remove huge default padding */
  margin: 0;
  width: 1rem;                       /* shrink the X */
  height: 1rem;
  line-height: 1;
  opacity: .75;
}
.alert.alert-compact.alert-dismissible .btn-close:focus { box-shadow: none; }
