/* searchable-select.css — drop-in styles for the searchable <select> upgrade.
   Bootstrap-friendly: the toggle reuses .form-control so it inherits your theme. */

.ss-wrap {
  position: relative;
  display: block;
}

/* The original <select> stays in the DOM so the form still submits it and native
   constraint validation ("required") still works. Do NOT use display:none here —
   Chrome refuses to submit a form with a hidden invalid required control. */
.ss-native {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  padding: 0;
  margin: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

/* ---- closed state: the button that looks like the select ---- */
.ss-toggle {
  
  background-color: #fff;
  color:#000;
      width: 120%;
    height: 45px;

}

.ss-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .25);
  border-color: #86b7fe;
}

.ss-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ss-value.ss-placeholder {
  color: #6c757d;
}

.ss-caret {
  flex: 0 0 auto;
  width: 0;
  height: 0;
  border-left: .3em solid transparent;
  border-right: .3em solid transparent;
  border-top: .35em solid currentColor;
  opacity: .6;
  transition: transform .15s ease;
  display:none;
}

.ss-wrap.is-open .ss-caret {
  transform: rotate(180deg);
}

.ss-wrap.is-invalid .ss-toggle {
  border-color: #dc3545;
}

/* ---- open state: search box + list ---- */
.ss-panel {
  position: absolute;
  z-index: 1060;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  max-height: 320px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .15);
  border-radius: .375rem;
  box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .175);
  overflow: hidden;
  width: 235%;
}

.ss-panel[hidden] {
  display: none;
}

.ss-search-wrap {
  padding: .5rem;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.ss-search {
  width: 100%;
}

.ss-list {
  list-style: none;
  margin: 0;
  padding: .25rem 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.ss-option {
  padding: .375rem .75rem;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ss-option[aria-selected="true"] {
  font-weight: 600;
}

.ss-option.is-active {
  background-color: #0d6efd;
  color: #fff;
}

.ss-option mark {
  padding: 0;
  background: rgba(255, 193, 7, .45);
  color: inherit;
  border-radius: 2px;
}

.ss-option.is-active mark {
  background: rgba(255, 255, 255, .3);
  color: inherit;
}

.ss-group {
  padding: .375rem .75rem .25rem;
  font-size: .8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #6c757d;
}

.ss-empty {
  padding: .75rem;
  color: #6c757d;
  text-align: center;
}

.ss-empty[hidden] {
  display: none;
}

/* Flag emoji do not render on most Windows desktops (they fall back to the two
   letters, e.g. "US"). This keeps that fallback legible instead of ragged. */
.ss-option,
.ss-value {
  font-variant-emoji: emoji;
}

/* ---- phones: show the panel as a bottom sheet so the list is thumb-reachable ---- */
@media (max-width: 575.98px) {
  .ss-wrap.is-open .ss-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1055;
    background: rgba(0, 0, 0, .35);
  }

  .ss-panel {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 70vh;
    border-radius: .75rem .75rem 0 0;
  }

  .ss-option {
    padding: .625rem .75rem; /* bigger tap target */
  }
}

/* ---- dark mode ---- */
@media (prefers-color-scheme: dark) {
  .ss-toggle,
  .ss-panel {
    background-color: #212529;
    color: #dee2e6;
    border-color: rgba(255, 255, 255, .15);
  }

  .ss-search {
    background-color: #2b3035;
    color: #dee2e6;
    border-color: rgba(255, 255, 255, .15);
  }

  .ss-value.ss-placeholder,
  .ss-group,
  .ss-empty {
    color: #adb5bd;
  }

  .ss-option.is-active {
    background-color: #0d6efd;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ss-caret {
    transition: none;
  }
}
@media only screen and (min-width: 240px) and (max-width: 960px) {
    .ss-toggle {
    background-color: #fff;
    color: #000;
    width: 100%;
    height: 45px;
    margin-bottom: 10px;
}
.ss-value img {
    vertical-align: middle;
    width: auto ! IMPORTANT;
        height: auto !important;
    margin-right: 10px;
}
    .ss-panel {
    width: 100% !important;
}
}
