
/* Container styles */
.cp {
  position: relative;
  display: inline-block;
  font: 14px "PT Sans", sans-serif;
  margin: 0;
  padding: 0;
}

.pill.search {
  display: inline-flex;
  align-items: center;
  height: 24px;
  border-radius: 8px;
  border: 1px solid #BCC7DD;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.03);
  min-width: 100px;
  width: auto;
  margin: 0;

  &.selected {
    background: #FEF3C1;
    border-color: #FFC800;

    .input { background: transparent; }
  }

  .label-slot { 
    flex: 1 1 auto; 
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    overflow: hidden; 
    white-space: nowrap; 
    text-overflow: ellipsis; 
  }

  .count-slot { 
    flex: 0 0 25px; 
    display: inline-flex; 
    justify-content: end;
  }

  .count-spacer { 
    display: inline-block; 
    width: 24px; 
    height: 18px; 
  }

  input {
    height: 18px;
    border: 0;
    outline: none;
    background: transparent;
    color: inherit;
    font: 14px "PT Sans", sans-serif;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    width: auto;
    min-width: 6ch;
    max-width: 10ch;
    flex: 0 0 auto;
  }

  .full-width-input {
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .full-width-text {
    width: 100%;
  }

  .text { 
    white-space: nowrap; 
  }

  .count-chip {
    display: inline-flex;
    align-items: center;

    .chip-x {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 14px;
      height: 14px;
      border-radius: 50%;
      background: #B0B0B0;
      cursor: pointer;
      color: white;
      font-size: 10px;

      &:hover { background: #9A9A9A; }
    }
  }
}

.search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 18px;
  color: #8D92A5;
  font-size: 14px;

  .msymbol {
    font-size: 14px;
    color: inherit;
  }
}


.search-icon-mode {
  position: relative;
  display: inline-block;
  font: 14px "PT Sans", sans-serif;
  margin: 0;
  padding: 0;

  .search-icon {
    width: 16px;
    height: 16px;
    font-size: 14px;
  
    .msymbol {
      font-size: 14px;
      color: #8D92A5;
    }
  }

  .search-icon-container {
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #BCC7DD;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: width 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    height: 24px;

    &:hover {
      border-color: #FFC800;
      background: #FEF3C1;
      box-shadow: inset 0 0 0 1px rgba(0,0,0,0.03);
    }

    &.expanded {
      background: #FEF3C1;
      border-color: #FFC800;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);

      input {
        opacity: 1;
      }

      &:hover {
        border-color: #FF8C00;
        background: #FEF3C1;
      }
    }
  }

  input {
    border: none;
    outline: none;
    background: transparent;
    color: inherit;
    font: 14px "PT Sans", sans-serif;
    padding: 0 28px 0 12px;
    margin: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
}

.search-icon-mode .search-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  transition: left 0.3s ease, right 0.3s ease;
}

.search-icon-mode .search-icon-container:not(.expanded) .search-icon {
  right: 4px;
}

.search-icon-mode .search-icon-container.expanded .search-icon {
  right: 4px;
  left: auto;
}

.search-icon-mode .search-icon-container:hover .search-icon .msymbol {
  color: #FF8C00;
}

.search-icon-mode .search-icon-container.expanded:hover .search-icon .msymbol {
  color: #FF8C00;
}


/* Search highlighting styles */
mark {
  background-color: #FEF3C1;
  color: #333;
  padding: 1px 2px;
  border-radius: 2px;
}
