.config-selector {
  position: relative;
  width: 100%;

  label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
  }

  .selector {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 12px;
    background-color: rgba(30, 30, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #ededed;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;

    &:hover {
      border-color: rgba(255, 255, 255, 0.2);
    }

    &.disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    .selected-config {
      font-weight: 500;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .selector-arrow {
      display: flex;
      align-items: center;
      color: rgba(255, 255, 255, 0.8);
      transition: transform 0.2s ease;
      flex-shrink: 0;
      margin-left: 8px;

      &.open {
        transform: rotate(180deg);
      }
    }
  }

  .dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    background-color: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);

    .dropdown-item {
      padding: 10px 12px;
      color: #ededed;
      font-size: 14px;
      cursor: pointer;
      transition: background-color 0.2s ease;
      display: flex;
      justify-content: space-between;
      align-items: center;

      .config-name {
        flex: 1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .delete-icon {
        opacity: 0.6;
        margin-left: 8px;
        color: rgba(255, 255, 255, 0.8);
        transition: opacity 0.2s ease;

        &:hover {
          opacity: 1;
          color: #ff4d4f;
        }
      }

      &:hover {
        background-color: #333333;
      }

      &.selected {
        background-color: #1e72e6;
        color: white;
        font-weight: 500;
      }

      &.loading {
        opacity: 0.7;
        font-style: italic;
        cursor: default;
      }

      &.create-new {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        color: #685fff;
        font-weight: 500;
        display: flex;
        align-items: center;

        .create-new-icon {
          margin-right: 8px;

          font-size: 16px;
          font-weight: bold;
        }

        &:hover {
          background-color: rgba(104, 95, 255, 0.1);
        }
      }
    }
  }
}
