/* ============================================================
   RPR Select2 Override — Procedure Ratings Nav Dropdown
   Matches the RPR design system (Manrope, --rpr-dark, etc.)
   ============================================================ */

/* ---- Wrapper ---- */
.rpr-nav__procedure-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* Hide the select2 rendered selection box — the <a> link is the visible trigger */
.rpr-nav__procedure-wrap .select2-container {
  position: absolute !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  overflow: visible !important;
  pointer-events: none;
  left: 0;
  bottom: 0;
}

/* ============================
   Dropdown panel
   Dropdown appended to <body> — target via .rpr-select2-dropdown class
   ============================ */
.rpr-select2-dropdown.select2-dropdown {
  background: #ffffff;
  border: none !important;
  border-radius: 16px;
  box-shadow:
    0 4px 9px 0 rgba(40, 37, 96, 0.17),
    0 16px 16px 0 rgba(40, 37, 96, 0.15),
    0 36px 22px 0 rgba(40, 37, 96, 0.09),
    0 64px 26px 0 rgba(40, 37, 96, 0.03),
    0 101px 28px 0 rgba(40, 37, 96, 0);
  margin-top: 8px;
  padding: 8px 0;
  overflow: hidden;
  z-index: 9999;
  min-width: 260px;
}

/* Search box styling */
.rpr-select2-dropdown .select2-search--dropdown {
  padding: 8px 16px;
}

.rpr-select2-dropdown .select2-search--dropdown .select2-search__field {
  font-family: "Manrope", Helvetica;
  font-size: 14px;
  color: rgba(40, 37, 96, 1);
  border: 1px solid rgba(114, 133, 163, 0.4);
  border-radius: 8px;
  padding: 8px 12px;
  outline: none;
  width: 100%;
}

.rpr-select2-dropdown .select2-search--dropdown .select2-search__field:focus {
  border-color: rgba(40, 37, 96, 0.5);
}

/* Results list */
.rpr-select2-dropdown .select2-results > .select2-results__options {
  max-height: 320px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Custom scrollbar */
.rpr-select2-dropdown .select2-results > .select2-results__options::-webkit-scrollbar {
  width: 6px;
}
.rpr-select2-dropdown .select2-results > .select2-results__options::-webkit-scrollbar-track {
  background: transparent;
}
.rpr-select2-dropdown .select2-results > .select2-results__options::-webkit-scrollbar-thumb {
  background-color: rgba(114, 133, 163, 0.3);
  border-radius: 3px;
}
.rpr-select2-dropdown .select2-results > .select2-results__options::-webkit-scrollbar-thumb:hover {
  background-color: rgba(114, 133, 163, 0.5);
}

/* Individual option */
.rpr-select2-dropdown .select2-results__option {
  font-family: "Manrope", Helvetica;
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.04px;
  line-height: 140%;
  color: rgba(40, 37, 96, 1);
  padding: 8px 20px;
  cursor: pointer;
  white-space: normal;
  word-break: break-word;
  transition: background-color 0.15s ease, color 0.15s ease;
}

/* Hover / highlighted */
.rpr-select2-dropdown .select2-results__option--highlighted[aria-selected] {
  background-color: rgba(242, 249, 255, 1) !important;
  color: rgba(40, 37, 96, 1) !important;
}

/* Selected */
.rpr-select2-dropdown .select2-results__option[aria-selected=true] {
  background-color: rgba(242, 249, 255, 1);
  color: rgba(217, 102, 39, 1);
  font-weight: 700;
}

/* Hide the disabled placeholder option ("Procedure Ratings") in the dropdown */
.rpr-select2-dropdown .select2-results__option[aria-disabled=true] {
  display: none;
}

/* Highlight matched search characters */
.rpr-select2-match {
  font-weight: 700;
  color: rgba(217, 102, 39, 1);
}

/* ============================================================
   Desktop Nav Search Overlay — full-width over nav links
   ============================================================ */

.rpr-nav__search-desktop {
  cursor: pointer;
  z-index: 2;
  position: relative;
}

/* Overlay — sits inside .rpr-nav__links, covers all links when open */
.rpr-nav__search-overlay {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  height: 48px;
  border-radius: 100px;
  background: #ffffff;
  box-shadow: 0 0 0 0 rgba(40, 37, 96, 0);
  display: flex;
  align-items: center;
  padding: 0 12px 0 20px;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  overflow: visible;
  transition:
    opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.35s ease;
  z-index: 10;
}

/* Open state */
.rpr-nav__search-overlay--open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  box-shadow:
    0 4px 9px 0 rgba(40, 37, 96, 0.17),
    0 16px 16px 0 rgba(40, 37, 96, 0.15),
    0 36px 22px 0 rgba(40, 37, 96, 0.09);
}

/* Input */
.rpr-nav__search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: "Manrope", Helvetica;
  font-weight: 500;
  font-size: 14px;
  color: rgba(40, 37, 96, 1);
  letter-spacing: -0.04px;
  line-height: 140%;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.rpr-nav__search-input::placeholder {
  color: rgba(114, 133, 163, 1);
  font-family: "Manrope", Helvetica;
  font-weight: 500;
  font-size: 14px;
}

/* Close button */
.rpr-nav__search-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(242, 249, 255, 1);
  color: rgba(40, 37, 96, 1);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease;
  padding: 0;
}

.rpr-nav__search-close:hover {
  background: rgba(40, 37, 96, 0.1);
}
